-
Notifications
You must be signed in to change notification settings - Fork 4
Changes for duration from milli to micro #32
base: rzp_main
Are you sure you want to change the base?
Changes from all commits
c5dcd32
24b7844
a2e6974
9e3735b
aa19553
933b506
e249e33
0af04af
272e8a3
138dfad
4911350
68065ea
c3cca6e
553a85f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,9 @@ protocol BackendEntityViewProtocol { | |
|
||
long duration_millis = 0; | ||
|
||
// duration micro | ||
double duration_micros = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be long? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As per our discussion, we went with double to store all the significant digits(might need in future). Making it LONG will defeat this purpose. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Long's upper limit is 9223372036854775807, which is equal to 292471.20867753599305 years. Do you think a span's duration will exceed this value? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we are talking about significant digits, not the range There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's say we have .123 ms that would be 0ms(in LONG), 123 micro seconds(LONG). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aren't we solving for microsecond granularity? It means the smallest duration we can report is 1µ. So 123.4 µs should be rounded off to 123 µs. This will keep things on the query layer simples as you wouldn't have to deal with converting data types. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As per discussion with team and tech specs I have added datatype as DOUBLE |
||
|
||
union { null, string } span_kind = null; | ||
|
||
int error_count = 0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,9 @@ protocol RawServiceViewProtocol { | |
|
||
long duration_millis; | ||
|
||
// duration micro | ||
double duration_micros = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||
|
||
union { null, string } span_kind = null; | ||
|
||
int error_count = 0; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this duration in micro across views, I think as per my understanding, only the span event view needed that (and the backend entity view).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sunn-y-Arora I think it's better to have this consistently across all views.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not required right? raw-service (for eg) view gives service ka overall rsp time, it will never be in micro, so unnecessary change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True but why have two different units in two different views? We'll anyway get rid of
duration_millis
across all tables, if extra storage and indexing cost is a concern. This also makes code the query side simpler, as it doesn't have to differentiate b/w the two columns IMO.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As pointed out by Prashant, added it in micro across views so that all the views have consistency.