chore: Sync the translator for otelcol.receiver.prometheus with upstream#5308
Merged
chore: Sync the translator for otelcol.receiver.prometheus with upstream#5308
Conversation
3 tasks
72bf207 to
5efb471
Compare
Contributor
|
💻 Deploy preview deleted (chore: Sync the translator for otelcol.receiver.prometheus with upstream). |
ptodev
commented
Jan 23, 2026
docs/sources/reference/components/otelcol/otelcol.receiver.prometheus.md
Outdated
Show resolved
Hide resolved
ptodev
added a commit
that referenced
this pull request
Jan 26, 2026
### Pull Request Details This component creates "start time" timestamps for OTLP metrics. Those timestamps are similar to the `_created` metrics in the [Prometheus spec](https://prometheus.io/docs/specs/om/open_metrics_spec/). AFAIK they are not widely used. This component is required in order for the translator package in `otelcol.receiver.prometheus` to be updated (#5308). The new translator outsources the responsibility of creating start timestamps to this new processor. The upstream component is called [metricstarttime](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.142.0/processor/metricstarttimeprocessor). I called this one `metric_start_time`, because there is an [open issue](open-telemetry/opentelemetry-collector-contrib#45339) upstream to rename it. ### PR Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [x] Documentation added - [ ] Tests updated - [x] Config converters updated
krajorama
reviewed
Jan 27, 2026
docs/sources/reference/components/otelcol/otelcol.receiver.prometheus.md
Outdated
Show resolved
Hide resolved
5efb471 to
dbde71a
Compare
Contributor
🔍 Dependency Reviewgithub.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.142.0 (direct) -> v0.142.0 (indirect) — ✅ Safe
No code changes are required to adopt this change. The PR already removes the only direct usage. Evidence:
No relevant changelog sections apply (no version change). Notes
|
ptodev
commented
Jan 27, 2026
docs/sources/reference/components/otelcol/otelcol.receiver.prometheus.md
Outdated
Show resolved
Hide resolved
ptodev
commented
Jan 27, 2026
docs/sources/reference/components/otelcol/otelcol.receiver.prometheus.md
Outdated
Show resolved
Hide resolved
deb5bb1 to
2d4ecac
Compare
docs/sources/reference/components/otelcol/otelcol.processor.metric_start_time.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.prometheus.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.prometheus.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.prometheus.md
Outdated
Show resolved
Hide resolved
5eb68d9 to
37dad5c
Compare
kgeckhart
reviewed
Feb 2, 2026
Contributor
kgeckhart
left a comment
There was a problem hiding this comment.
Did my best to review what's here mostly for clarity.
internal/component/otelcol/receiver/prometheus/internal/transaction_bench_test.go
Show resolved
Hide resolved
internal/component/otelcol/receiver/prometheus/internal/transaction.go
Outdated
Show resolved
Hide resolved
internal/component/otelcol/receiver/prometheus/internal/transaction.go
Outdated
Show resolved
Hide resolved
internal/component/otelcol/receiver/prometheus/internal/transaction.go
Outdated
Show resolved
Hide resolved
internal/component/otelcol/receiver/prometheus/internal/staleness_end_to_end_test.go
Show resolved
Hide resolved
This reconciliation does not include upstream's target allocator.
This reverts commit f929733.
…ld only estimate start time if it didn't exist.
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
…tric_start_time.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Co-authored-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
9a64343 to
d99725d
Compare
kgeckhart
approved these changes
Feb 4, 2026
docs/sources/reference/components/otelcol/otelcol.processor.metric_start_time.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.processor.metric_start_time.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.prometheus.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.prometheus.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.prometheus.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Brief description of Pull Request
feat(otelcol.receiver.prometheus): It is no longer required to run Alloy with
--stability.level=experimentalin order to translate Prometheus native histograms into OTLP exponential histograms.BREAKING CHANGE:
otelcol.receiver.prometheusno longer sets start times of OTLP metrics. Grafana Cloud and Mimir do not currently use OTLP metric start times. If you do want your metrics to have them, you can useotelcol.processor.metric_start_timewithstrategyset totrue_reset_pointto get the same behaviour.Pull Request Details
Issue(s) fixed by this Pull Request
Notes to the Reviewer
PR Checklist
BEGIN_COMMIT_OVERRIDE
feat(otelcol.receiver.prometheus): Remove requirement to run Alloy with
--stability.level=experimentalin order to translate Prometheus native histograms into OTLP exponential histograms. (#5308)BREAKING CHANGE:
otelcol.receiver.prometheusno longer sets start times of OTLP metrics. Grafana Cloud and Mimir do not currently use OTLP metric start times. If you do want your metrics to have them, you can useotelcol.processor.metric_start_timewithstrategyset totrue_reset_pointto get the same behaviour.END_COMMIT_OVERRIDE