Skip to content

Add http request duration to SDK metrics#2007

Merged
lmolkova merged 20 commits intoopen-telemetry:mainfrom
lzchen:requests-duration
Apr 9, 2025
Merged

Add http request duration to SDK metrics#2007
lmolkova merged 20 commits intoopen-telemetry:mainfrom
lzchen:requests-duration

Conversation

@lzchen
Copy link
Copy Markdown
Contributor

@lzchen lzchen commented Mar 18, 2025

Related to #1631 and partially addresses #1906

Changes

Adds a metric to track the duration of http requests made within an exporter.

Following the discussion in this issue, I wasn't exactly sure how we want to provide more detail regarding partial success. The error.type can indicate that it was a partial success but we can possibly also include information about which items succeeded/failed somewhere (perhaps in another attribute).

I also made the distinction of making this metric specific to http but am open to defining a generic one regardless of transport protocol (we can probably have protocol + response code as additional attributes if so).

Looking forward to hearing your thoughts!

Merge requirement checklist

Copy link
Copy Markdown
Member

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (with a couple of small comments)

Copy link
Copy Markdown
Contributor

@JonasKunz JonasKunz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (after applying @lmolkova's suggestions)

@lzchen
Copy link
Copy Markdown
Contributor Author

lzchen commented Apr 8, 2025

Is there something failing with the builds? Doesn't look like it's related to this pr. :O

@lmolkova lmolkova moved this from Untriaged to Needs More Approval in Semantic Conventions Triage Apr 8, 2025
@lmolkova
Copy link
Copy Markdown
Member

lmolkova commented Apr 9, 2025

@lzchen could you please resolve the conflict? It's ready to go otherwise

@lzchen
Copy link
Copy Markdown
Contributor Author

lzchen commented Apr 9, 2025

@lmolkova
Should be good to go!

@lmolkova lmolkova merged commit e2d0558 into open-telemetry:main Apr 9, 2025
15 checks passed
@lzchen lzchen deleted the requests-duration branch April 9, 2025 16:35
lmolkova pushed a commit to lmolkova/semantic-conventions that referenced this pull request May 13, 2025
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants