types.proto: timestamp unit

20 views
Skip to first unread message

Asaf Mesika

unread,
Sep 7, 2020, 11:23:31 AM9/7/20
to Prometheus Developers
Hi,

I'm trying to see which API I need to answer to write a Remote Storage, and there is something which is explicit, so I'd thought I'll ask here:



message Sample {

double value = 1;

int64 timestamp = 2;
}

What are the units for timestamp? Seconds (my guess) or milliseconds?

Maybe it's better to name it accordingly (it won't break backward compatibility due to IDs right?)

Thanks!

Brian Brazil

unread,
Sep 7, 2020, 11:32:11 AM9/7/20
to Asaf Mesika, Prometheus Developers
On Mon, 7 Sep 2020 at 16:23, Asaf Mesika <ame...@logz.io> wrote:
Hi,

I'm trying to see which API I need to answer to write a Remote Storage, and there is something which is explicit, so I'd thought I'll ask here:



message Sample {

double value = 1;

int64 timestamp = 2;
}

What are the units for timestamp? Seconds (my guess) or milliseconds?

Yes, it'll be milliseconds as that's what Prometheus uses internally.

Brian
 

Maybe it's better to name it accordingly (it won't break backward compatibility due to IDs right?)

Thanks!

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/254ab508-bdf8-4ef5-a9ea-9af59ad9cd6bn%40googlegroups.com.


--

Asaf Mesika

unread,
Sep 7, 2020, 1:29:21 PM9/7/20
to Brian Brazil, Prometheus Developers
Does it make sense to rename the field in the protobuf to prevent confusion or just add comment above it ? I can do the PR

Brian Brazil

unread,
Sep 7, 2020, 1:53:42 PM9/7/20
to Asaf Mesika, Prometheus Developers
On Mon, 7 Sep 2020 at 18:29, Asaf Mesika <ame...@logz.io> wrote:
Does it make sense to rename the field in the protobuf to prevent confusion or just add comment above it ? I can do the PR

That probably makes sense, though quite a few places will need updating.

Brian
Reply all
Reply to author
Forward
0 new messages