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

[prometheus-httplistener] Throw an exception if the listener cannot be started #5304

Merged

Conversation

CodeBlanch
Copy link
Member

@CodeBlanch CodeBlanch commented Feb 1, 2024

Fixes #5283
Fixes #4913
Fixes #3292

Changes

  • Fix the PrometheusHttpListener so it throws from Start if it can't actually start.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes

@CodeBlanch CodeBlanch added pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package metrics Metrics signal related labels Feb 1, 2024
@CodeBlanch CodeBlanch requested a review from a team February 1, 2024 20:01
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (6250307) 83.38% compared to head (fa37e05) 82.98%.
Report is 50 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5304      +/-   ##
==========================================
- Coverage   83.38%   82.98%   -0.40%     
==========================================
  Files         297      272      -25     
  Lines       12531    11975     -556     
==========================================
- Hits        10449     9938     -511     
+ Misses       2082     2037      -45     
Flag Coverage Δ
unittests ?
unittests-Solution-Experimental 82.98% <77.89%> (?)
unittests-Solution-Stable 82.95% <77.89%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
....Api/Context/Propagation/TraceContextPropagator.cs 90.00% <100.00%> (+0.52%) ⬆️
...etryProtocol/Implementation/ExperimentalOptions.cs 100.00% <ø> (ø)
...tation/OpenTelemetryProtocolExporterEventSource.cs 100.00% <100.00%> (ø)
...rotocol/Implementation/OtlpLogRecordTransformer.cs 95.41% <100.00%> (+1.95%) ⬆️
....Prometheus.HttpListener/PrometheusHttpListener.cs 81.70% <100.00%> (ø)
...tation.AspNetCore/Implementation/HttpInListener.cs 89.79% <100.00%> (+0.21%) ⬆️
...AspNetCore/Implementation/HttpInMetricsListener.cs 89.74% <100.00%> (+0.26%) ⬆️
...ntation.GrpcNetClient/GrpcClientInstrumentation.cs 100.00% <100.00%> (ø)
...NetClient/GrpcClientTraceInstrumentationOptions.cs 100.00% <ø> (ø)
...ent/Implementation/GrpcClientDiagnosticListener.cs 75.80% <100.00%> (-2.77%) ⬇️
... and 14 more

... and 37 files with indirect coverage changes

@CodeBlanch CodeBlanch merged commit 8b54074 into open-telemetry:main Feb 1, 2024
31 checks passed
@CodeBlanch CodeBlanch deleted the prometheus-httplistener-fixes branch February 1, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metrics Metrics signal related pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package
Projects
None yet
2 participants