open-telemetry / opentelemetry-dotnet

The OpenTelemetry .NET Client
https://opentelemetry.io
Apache License 2.0
3.18k stars 753 forks source link

[Exporter.Prometheus] Nullable #5791

Closed ysolomchenko closed 2 weeks ago

ysolomchenko commented 1 month ago

Towards https://github.com/open-telemetry/opentelemetry-dotnet/issues/3958

Changes

Merge requirement checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.22%. Comparing base (6250307) to head (46e5fed). Report is 314 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791/graphs/tree.svg?width=650&height=150&src=pr&token=vscyfvPfy5&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #5791 +/- ## ========================================== + Coverage 83.38% 86.22% +2.84% ========================================== Files 297 257 -40 Lines 12531 11166 -1365 ========================================== - Hits 10449 9628 -821 + Misses 2082 1538 -544 ``` | [Flag](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `?` | | | [unittests-Project-Experimental](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `86.19% <100.00%> (?)` | | | [unittests-Project-Stable](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `86.21% <100.00%> (?)` | | | [unittests-UnstableCoreLibraries-Experimental](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `85.76% <100.00%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [...ometheus.AspNetCore/PrometheusAspNetCoreOptions.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.AspNetCore%2FPrometheusAspNetCoreOptions.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5Bc3BOZXRDb3JlL1Byb21ldGhldXNBc3BOZXRDb3JlT3B0aW9ucy5jcw==) | `50.00% <100.00%> (-25.00%)` | :arrow_down: | | [.../PrometheusExporterApplicationBuilderExtensions.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.AspNetCore%2FPrometheusExporterApplicationBuilderExtensions.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5Bc3BOZXRDb3JlL1Byb21ldGhldXNFeHBvcnRlckFwcGxpY2F0aW9uQnVpbGRlckV4dGVuc2lvbnMuY3M=) | `100.00% <ø> (ø)` | | | [...rometheusExporterEndpointRouteBuilderExtensions.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.AspNetCore%2FPrometheusExporterEndpointRouteBuilderExtensions.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5Bc3BOZXRDb3JlL1Byb21ldGhldXNFeHBvcnRlckVuZHBvaW50Um91dGVCdWlsZGVyRXh0ZW5zaW9ucy5jcw==) | `100.00% <ø> (ø)` | | | [...rometheusExporterMeterProviderBuilderExtensions.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.AspNetCore%2FPrometheusExporterMeterProviderBuilderExtensions.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5Bc3BOZXRDb3JlL1Byb21ldGhldXNFeHBvcnRlck1ldGVyUHJvdmlkZXJCdWlsZGVyRXh0ZW5zaW9ucy5jcw==) | `100.00% <ø> (ø)` | | | [...metheus.AspNetCore/PrometheusExporterMiddleware.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.AspNetCore%2FPrometheusExporterMiddleware.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5Bc3BOZXRDb3JlL1Byb21ldGhldXNFeHBvcnRlck1pZGRsZXdhcmUuY3M=) | `73.17% <100.00%> (+3.17%)` | :arrow_up: | | [...tpListener/Internal/PrometheusCollectionManager.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.HttpListener%2FInternal%2FPrometheusCollectionManager.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5IdHRwTGlzdGVuZXIvSW50ZXJuYWwvUHJvbWV0aGV1c0NvbGxlY3Rpb25NYW5hZ2VyLmNz) | `86.20% <100.00%> (+8.42%)` | :arrow_up: | | [...etheus.HttpListener/Internal/PrometheusExporter.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.HttpListener%2FInternal%2FPrometheusExporter.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5IdHRwTGlzdGVuZXIvSW50ZXJuYWwvUHJvbWV0aGV1c0V4cG9ydGVyLmNz) | `100.00% <100.00%> (ø)` | | | [...s.HttpListener/Internal/PrometheusHeadersParser.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.HttpListener%2FInternal%2FPrometheusHeadersParser.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5IdHRwTGlzdGVuZXIvSW50ZXJuYWwvUHJvbWV0aGV1c0hlYWRlcnNQYXJzZXIuY3M=) | `100.00% <ø> (ø)` | | | [...ometheus.HttpListener/Internal/PrometheusMetric.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.HttpListener%2FInternal%2FPrometheusMetric.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5IdHRwTGlzdGVuZXIvSW50ZXJuYWwvUHJvbWV0aGV1c01ldHJpYy5jcw==) | `74.12% <100.00%> (+2.37%)` | :arrow_up: | | [...heus.HttpListener/Internal/PrometheusSerializer.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.HttpListener%2FInternal%2FPrometheusSerializer.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5IdHRwTGlzdGVuZXIvSW50ZXJuYWwvUHJvbWV0aGV1c1NlcmlhbGl6ZXIuY3M=) | `86.85% <100.00%> (+1.98%)` | :arrow_up: | | ... and [3 more](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | | ... and [214 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5791/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)
github-actions[bot] commented 1 month ago

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day.

github-actions[bot] commented 3 weeks ago

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day.

TimothyMothra commented 2 weeks ago

@rajkumar-rangaraj, we need a Prometheus expert to help with this review. There's a lot of changes I'm unsure about.