Switch latency type in move data to int instead of string #202
Replies: 3 comments 1 reply
-
I definitely agree that it makes more sense as an int but I would be wary about changing the api in a way that could break snakes. Maybe this could be a change to save for api version 2? |
Beta Was this translation helpful? Give feedback.
-
I'll bring this up with the team, thanks @ambadoom for the bump 👍 For historical context --> we originally embedded units in the string, which is why it's the way it is today ie: "123 ms" |
Beta Was this translation helpful? Give feedback.
-
We talked this over briefly, and think it's a worthwhile change to include in the next API version (whenever that is). Tagged accordingly so that it gets picked up then! |
Beta Was this translation helpful? Give feedback.
-
I ran into a problem logging latency to New Relic where I couldn't use a comparison operator in NRQL (New Relic Query Language) because it's a string instead of an int.
Here was my first attempt at logging it:
And then I tried to show longer than normal latency in a dashboard using this query:
This always returns 0 results because the
>
operator doesn't work between string and int.The fix was fairly easy, but this had me puzzled for a while before I realized why it wasn't working. Fixed version:
Would it be possible to change the type to an int? I know this could break people's code, but it seems like a better type for this data, and could help save others from having similar problems in the future.
Beta Was this translation helpful? Give feedback.
All reactions