[DNM/DNR] Prometheus compatibility fixes#7243
Draft
martincostello wants to merge 88 commits into
Draft
Conversation
- Add support for configuring OpenTelemetry.Exporter.Prometheus.HttpListener with the `OTEL_EXPORTER_PROMETHEUS_HOST` and `OTEL_EXPORTER_PROMETHEUS_PORT` environment variables. - Remove field for UriPrefixes and use auto-property. - Remove `UriPrefixes` from the README. Fixes open-telemetry#4158. Fixes open-telemetry#7154.
Fix markdownlint warnings.
Add coverage for invalid environment variables.
Remove extra semicolons.
React to changes from open-telemetry#7175.
Remove duplicated constructor declaration.
- Add missing SHOULD requirement to specify the `escaping` value for 1.0.0 protocols. - Update `PrometheusSerializer` to be compliant with `escaping=underscores` when using OpenMetrics.
Fix missing prefixing for metrics that start with a digit.
- Use canonical representations for numbers for "le" label values of histograms and "quantile" label values of summary metrics for OpenMetrics. - Resolve TODO by moving check outside loop. See https://prometheus.io/docs/specs/om/open_metrics_spec/#considerations-canonical-numbers.
Add CHANGELOG entries.
Remove branches that could not be reached.
- Check destination size. - Update CHANGELOGs.
Fix incorrect serialized value for `PrometheusType.Untyped` when using OpenMetrics.
Omit histogram `_sum` and `_count` in OpenMetrics when negative bucket thresholds are present.
Update PR number.
Export `{name}_created` series for counters and histograms when start time is available when using OpenMetrics.
Add missing `TYPE` metadata.
- Remove non-spec `TYPE` for `_counter`. - Fix-up timestamp precision.
Fix-up duplicated definitions.
Fix-up merge.
Add missing suffix.
- Emit OpenMetrics scope metadata as a single `otel_scope` metric family with `otel_scope_info` samples instead of repeating metadata for every scope. - Include instrumentation scope metadata on samples using `otel_scope_*` labels, including scope version, schema URL, and prefixed scope attributes. - Drop conflicting scope attributes named `name`, `version`, and `schema_url` to avoid collisions with generated scope labels.
Remove Go theme for .NET.
Add CHANGELOG entries.
Address Copilot review feedback.
Add more test coverage for patch.
Add Prometheus text fallback `target_info` output as a gauge so resource metadata is still exposed as Info-typed metrics are unavailable for PrometheusText exposition format.
Add PR number.
Merge colliding sanitized label keys by concatenating values in lexicographic order of the original keys.
Set bind-mount file permissions on Linux.
Extend the ASP.NET Core integration tests to include interop between ASP.NET Core and Prometheus itself to scrape metrics.
Observe client requests to abort scrape request processing, including via `X-Prometheus-Scrape-Timeout-Seconds`, and respond with an HTTP 408.
Add PR number.
- Log exceptions calling Prometheus. - Use top-level cancellation instead of nested. - Delete temporary configuration files.
Refactor Prometheus content negotiation to more closely follow https://prometheus.io/docs/instrumenting/content_negotiation/. Contributes to open-telemetry#7156, open-telemetry#7207 and open-telemetry#7246.
Use `ImmutableHashSet<T>` where available.
Add PR numbers.
- Constrain accepted `X-Prometheus-Scrape-Timeout-Seconds` values. - Check cancellation token source. - Do not try to set the status if response has started.
…sts' into prometheus-compatibility-fixes
…out-Seconds' into prometheus-compatibility-fixes
… prometheus-compatibility-fixes
Sort usings.
Fix exception being thrown if `OTEL_SDK_DISABLED=true`. See open-telemetry#7272.
- Disable SDK with in-memory configuration instead of environment variables. - Remove accidentally added environment variable to other integration test.
Add PR number.
Avoid creating an `PrometheusExporter` and `PrometheusCollectionManager` with 170KB memory overhead when the SDK is disabled.
Extend the ASP.NET Core integration tests to include interop between ASP.NET Core and Prometheus itself to scrape metrics.
- Log exceptions calling Prometheus. - Use top-level cancellation instead of nested. - Delete temporary configuration files.
Add support for GZip compression. Resolves open-telemetry#7213.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This PR combines all of the changes from the PRs below. It is not intended to be merged, it's just to help me track the overall end-goal of those PRs once everything is fixed together.
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)