feat(configuration): add prometheus exporter support#6400
Merged
maryliag merged 3 commits intoopen-telemetry:mainfrom Feb 12, 2026
Merged
feat(configuration): add prometheus exporter support#6400maryliag merged 3 commits intoopen-telemetry:mainfrom
maryliag merged 3 commits intoopen-telemetry:mainfrom
Conversation
- Add PullMetricReader import - Handle 'prometheus' exporter type with pull reader - Support OTEL_EXPORTER_PROMETHEUS_HOST and OTEL_EXPORTER_PROMETHEUS_PORT - Default to localhost:9464 - Added tests for default and custom config
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6400 +/- ##
=======================================
Coverage 95.50% 95.50%
=======================================
Files 365 365
Lines 11609 11615 +6
Branches 2677 2680 +3
=======================================
+ Hits 11087 11093 +6
Misses 522 522
🚀 New features to boost your workflow:
|
Contributor
|
Thank you for working on these changes. Closes #6063 |
maryliag
reviewed
Feb 11, 2026
Co-authored-by: Marylia Gutierrez <maryliag@gmail.com>
maryliag
approved these changes
Feb 12, 2026
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.
Which problem is this PR solving?
Adds support for the Prometheus exporter in the OpenTelemetry configuration package to support RC3 configuration specification.
Currently, the configuration package supports OTLP and console exporters for metrics, but does not support Prometheus, which is a commonly used metrics backend that requires different configuration (pull-based vs push-based).
Short description of the changes
This PR adds Prometheus exporter support to the
@opentelemetry/configurationpackage:Added Prometheus exporter handling in
EnvironmentConfigFactory.tsOTEL_METRICS_EXPORTER=prometheusPullMetricReader(notPeriodicMetricReader) since Prometheus is pull-basedOTEL_EXPORTER_PROMETHEUS_HOST(default:localhost)OTEL_EXPORTER_PROMETHEUS_PORT(default:9464)Added tests in
ConfigFactory.test.tsType of change
How Has This Been Tested?
PullMetricReader(notPeriodicMetricReader)Checklist: