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

Metrics time cost not equal with Span duration #5905

Open
danielqsj opened this issue Apr 21, 2022 · 2 comments
Open

Metrics time cost not equal with Span duration #5905

danielqsj opened this issue Apr 21, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@danielqsj
Copy link

Describe the bug
In io.opentelemetry.instrumentation.api.instrumenter.Instrumenter,
There will calculate the startTime and endTime for both span and metrics.
But due to the interface of timeExtractor is only implemented by a few of instrumentation,
so the startTime and endTime in span and metrics are different.

In most cases, the time cost (metrics endTime - metrics startTime) in metrics will be smaller than the correspond span duration (span endTime - span startTime).

This is confusing for end users.

Steps to reproduce
Invoke most cases of call.

What did you expect to see?
The time cost (metrics endTime - metrics startTime) in metrics is equal with the correspond span duration (span endTime - span startTime).

What did you see instead?
In most cases, the time cost (metrics endTime - metrics startTime) in metrics will be smaller than the correspond span duration (span endTime - span startTime).

What version are you using?
v1.11.1

@danielqsj danielqsj added the bug Something isn't working label Apr 21, 2022
@mateuszrzeszutek
Copy link
Member

Also related: #4690

@danielqsj
Copy link
Author

@mateuszrzeszutek is there any plan to enhance it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants