-
Notifications
You must be signed in to change notification settings - Fork 773
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
HttpSemanticConventions - new metric in AspNetCore Instrumentation. #4802
Changes from 40 commits
91f08c8
c111eea
32d8946
3208431
d2f7ef4
1a49dab
7c11551
93fe6ad
3842aa8
ec2b825
5f74488
9fb75e5
c335f65
6c86a4a
3bcefae
e588453
88355cd
6a3f651
1a72356
b9d194c
ac76993
b57320d
7fdc29f
a782b51
3788d15
275de4e
c6d5d76
3789fdd
f110b29
6a52fcf
7c11aac
9ab958c
3646823
314c9d9
255b2da
12d10cf
c38a93e
26ea138
1fd022b
1f787be
0b257af
4987540
0cfa424
163d4d7
80df848
9f83898
744a980
1d694bc
390d563
6d4bb65
0015a20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,18 @@ | |
|
||
## Unreleased | ||
|
||
* Introduced a new metric, `http.server.request.duration`, for users who opt | ||
into the new semantic convention by configuring the `OTEL_SEMCONV_STABILITY_OPT_IN` | ||
environment variable. This metric measures time in seconds and offers unique | ||
histogram buckets as per the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not sure how to interpret "offers unique histogram buckets"? What does it mean? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "offers" is the wrong word here, "uses" would be more appropriate. I'm trying to find a succinct way to describe that this metric is different than what came before. ie:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the list is good. Hint that the buckets are so, because SDK specially handles this metric. |
||
[spec](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverrequestduration) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
, replacing the previous `http.server.duration metric`, which measured time in | ||
TimothyMothra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
milliseconds. | ||
* Former buckets: `0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, | ||
TimothyMothra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
5000, 7500, 10000` | ||
* New buckets: `0, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, | ||
2.5, 5, 7.5, 10` | ||
|
||
## 1.5.1-beta.1 | ||
|
||
Released 2023-Jul-20 | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -90,13 +90,29 @@ public void ConfigureServices(IServiceCollection services) | |||||
|
||||||
#### List of metrics produced | ||||||
|
||||||
The instrumentation is implemented based on [metrics semantic | ||||||
conventions](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/http-metrics.md#metric-httpserverduration). | ||||||
Currently, the instrumentation supports the following metric. | ||||||
The instrumentation is implemented based on | ||||||
[metrics semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/4bbb8c907402caa90bc077214e8a2c78807c1ab9/docs/http/http-metrics.md). | ||||||
|
||||||
| Name | Instrument Type | Unit | Description | | ||||||
|-------|-----------------|------|-------------| | ||||||
| `http.server.duration` | Histogram | `ms` | Measures the duration of inbound HTTP requests. | | ||||||
Have you opt-ed into the new Http Semantic Conventions using `OTEL_SEMCONV_STABILITY_OPT_IN`? | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* If yes, the instrumentation supports the following metric. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not clear. The env variable can take none,http,http/dup as values, This doc should also be structured in that way. i.e what if the env variable is set to "none", (also the default) |
||||||
|
||||||
| Name | Instrument Type | Unit | Description | | ||||||
|-------|-----------------|------|-------------| | ||||||
| `http.server.request.duration` | Histogram | `s` | Measures the duration of inbound HTTP requests. | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it'd be good to callout here that SDK uses a special treatment for this metric by using a suitable buckets. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How much information are you looking for? I could include a link to the spec which shows the buckets: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. something along the lines of ^ feel free to edit/modify! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated. please re-review There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd highlight/make it clear that the workaround is "OpenTelemetry SDK specially treats this metric and uses a diff. default for histogram buckets, matching the recommended buckets" /similar wording. This will ensure most folks do not have any need to go and read the linked PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the linked PR is very light on details. That must be fixed separately. Specifically,
(Not part of this PR, but this is essential to get the whole transition smoother for end users) |
||||||
|
||||||
This metric is emitted in `seconds` as per the semantic convention. While | ||||||
TimothyMothra marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
the convention [recommends using custom histogram buckets](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverrequestduration) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the commit tag? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm conflicted here. I can change links in both the Readme and Changelog to a commit as you've suggested. |
||||||
, this feature is not yet available via .NET Metrics API. | ||||||
A [workaround](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4820) | ||||||
has been included in OTel SDK starting version `1.6.0` which applies | ||||||
recommended buckets by default for this metric. | ||||||
|
||||||
* If no, the instrumentation supports the following metric. | ||||||
|
||||||
| Name | Instrument Type | Unit | Description | | ||||||
|-------|-----------------|------|-------------| | ||||||
| `http.server.duration` | Histogram | `ms` | Measures the duration of inbound HTTP requests. | | ||||||
|
||||||
## Advanced configuration | ||||||
|
||||||
|
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.
https://www.merriam-webster.com/dictionary/opt%20in#examples