Skip to content
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

Metric timestamps in the distant past on chrome #3383

Closed
MisterSquishy opened this issue Nov 4, 2022 · 2 comments · Fixed by #3514
Closed

Metric timestamps in the distant past on chrome #3383

MisterSquishy opened this issue Nov 4, 2022 · 2 comments · Fixed by #3514
Assignees
Labels
bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect sdk:metrics Issues and PRs related to the Metrics SDK

Comments

@MisterSquishy
Copy link
Contributor

What happened?

Steps to Reproduce

call createCounter('test_counter').add(1); from an instance of Chrome on version 106.0.5249.119 (i'm not sure exactly how far back this open bug goes, but it's definitely in that version)

Expected Result

test_counter metric emitted with timestamp reflecting the time the metric was recorded

Actual Result

test_counter metric emitted with timestamp from days/weeks ago, depending on how long you've had chrome open

Additional Details

this is the metrics side of #3355. both of these issues could be fixed by #3279, but it's actually even easier in the metrics case, since metrics don't need a monotonic clock and could safely just use Date.now()

OpenTelemetry Setup Code

No response

package.json

No response

Relevant log output

No response

@MisterSquishy MisterSquishy added bug Something isn't working triage labels Nov 4, 2022
@dyladan dyladan added priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect and removed triage labels Nov 4, 2022
@dyladan dyladan self-assigned this Nov 4, 2022
@legendecas legendecas added the sdk:metrics Issues and PRs related to the Metrics SDK label Nov 7, 2022
@kidbai
Copy link

kidbai commented Dec 29, 2022

I had the same problem.
The npm what I use is "@opentelemetry/sdk-metrics": "^1.8.0",.
And the result is startTimeUnixNano":1671337155932700000,"timeUnixNano":1671337159934300000 which is generated just now but in the distant past.

@yuanman0109
Copy link

Is there any breakthrough in this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect sdk:metrics Issues and PRs related to the Metrics SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants