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

(connectors/spanmetricsconnector): Spanmetrics Connector, move starttimestamps from root-level span to child-level spans #36019

Closed

Conversation

shivanthzen
Copy link
Contributor

@shivanthzen shivanthzen commented Oct 28, 2024

Description

startimestamps for metrics are stored at resource level. Child spans that occur sparsely or async process that occurs much later also use these starttimestamps which is incorrect. This MR moves the start timestamp (and lastsseen timestamp) from root span level(resource level) to child span level (metric level).
POC for #35994

Link to tracking issue

Fixes #35994

Testing

Documentation

shivanthzen added a commit to shivanthzen/opentelemetry-collector-contrib that referenced this pull request Nov 4, 2024
… of a metric is currently tied to the root span. When a "new" child span appears for trace (eg : unhappy path on an api call which results in a new subspan or an async process that was triggered much later), the time starttimestamp for the new metric for the new child span is that of the parent span(which can be well in the past).

This MR moves the start timestamp from resource level (root span) to metric level(child span)  . (Doesn't consider delta-temporality as of now).
References: open-telemetry#35994
Upstream Fix: open-telemetry#36019
shivanthzen added a commit to shivanthzen/opentelemetry-collector-contrib that referenced this pull request Nov 4, 2024
Currently while generating metrics out of traces, the start timestamp of a metric is currently tied to the root span. When a "new" child span  appears for trace (eg : unhappy path on an api call which results in a new subspan or an async process that was triggered much later), the time starttimestamp for the new metric for the new child span  is that of the parent span(which can be well in the past).
This MR moves the start timestamp from resource level (root span) to metric level(child span)  . (Doesn't consider delta-temporality as of now).
References: open-telemetry#35994
Upstream Fix: open-telemetry#36019
@shivanthzen shivanthzen changed the title DONOTREVIEW: Spanmetrics Connector, move timestamps from resource level to Metric level (connectors/spanmetricsconnector): Spanmetrics Connector, move starttimestamps from root-level span to child-level spans Nov 4, 2024
@shivanthzen shivanthzen marked this pull request as ready for review November 4, 2024 14:18
@shivanthzen shivanthzen requested a review from a team as a code owner November 4, 2024 14:18
@shivanthzen
Copy link
Contributor Author

@dashpole Looks like spanmetrics connector is seeking new codeowners as per the weekly report . is there any way to get this expedite the process of getting a review ?

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Nov 20, 2024
Copy link
Contributor

github-actions bot commented Dec 5, 2024

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[connector/spanmetrics] Incorrect starttimestamps for subspans.
2 participants