-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for timestamp metrics with seconds precision #558
Conversation
@trvrnrth Please rebase so we can go ahead. |
68785e7
to
04058d9
Compare
I've re-based a couple of times to keep up with master, however it looks like the last test workflow run timed out. I'm not able to retry it, but it does not appear related to the changes here or recently merged to master. |
@@ -209,7 +209,9 @@ func asFloat64(value interface{}) (*float64, error) { | |||
f = v | |||
case primitive.DateTime: | |||
f = float64(v) | |||
case primitive.A, primitive.ObjectID, primitive.Timestamp, primitive.Binary, string, []uint8, time.Time: | |||
case primitive.Timestamp: | |||
f = float64(v.T) |
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.
Can we use time.Unix()
or time.UnixMilli()
or any of those functions to make it more clear?
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.
I guess you could do f = float64(time.Unix(v.T, 0).Unix())
but I'm not sure that makes it clearer!
de615e7
to
d1da42e
Compare
d1da42e
to
a447b20
Compare
Hi ! 👋 |
@percona-csalguero @ShashankSinha252 @tshcherban Do you need me to do anything to faciliate getting this merged? |
a447b20
to
a5fdee2
Compare
@rnovikovP please check it out |
This is useful for exporting oplog metrics in order to calculate the oplog window as the difference between mongodb_ss_oplog_latestOptime and mongodb_ss_oplog_earliestOptime
f2f4202
to
542bb89
Compare
@denisok @rnovikovP I've rebased to keep this PR up to date. Is this something that could be looked at? |
@BupycHuk please check it out |
This is useful for exporting oplog metrics in order to calculate the oplog window as the difference between
mongodb_ss_oplog_latestOptime
andmongodb_ss_oplog_earliestOptime
PMM-6927
Once all checks pass and the code is ready for review, please add
pmm-review-exporters
team as the reviewer. That would assign people from the review team automatically. Report any issues on our Forum or Discord.