Skip to content

chore: Sync the translator for otelcol.receiver.prometheus with upstream#5308

Merged
ptodev merged 17 commits intomainfrom
ptodev/nhcb-test-otel-branch
Feb 5, 2026
Merged

chore: Sync the translator for otelcol.receiver.prometheus with upstream#5308
ptodev merged 17 commits intomainfrom
ptodev/nhcb-test-otel-branch

Conversation

@ptodev
Copy link
Contributor

@ptodev ptodev commented Jan 21, 2026

Brief description of Pull Request

feat(otelcol.receiver.prometheus): It is no longer required to run Alloy with --stability.level=experimental in order to translate Prometheus native histograms into OTLP exponential histograms.

BREAKING CHANGE: otelcol.receiver.prometheus no 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 use otelcol.processor.metric_start_time with strategy set to true_reset_point to get the same behaviour.

Pull Request Details

Issue(s) fixed by this Pull Request

Notes to the Reviewer

PR Checklist

  • Documentation added
  • Tests updated
  • Config converters updated

BEGIN_COMMIT_OVERRIDE
feat(otelcol.receiver.prometheus): Remove requirement to run Alloy with --stability.level=experimental in order to translate Prometheus native histograms into OTLP exponential histograms. (#5308)

BREAKING CHANGE: otelcol.receiver.prometheus no 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 use otelcol.processor.metric_start_time with strategy set to true_reset_point to get the same behaviour.
END_COMMIT_OVERRIDE

@ptodev ptodev changed the title Sync the translator for otelcol.receiver.prometheus with upstream chore: Sync the translator for otelcol.receiver.prometheus with upstream Jan 21, 2026
@ptodev ptodev force-pushed the ptodev/nhcb-test-otel-branch branch from 72bf207 to 5efb471 Compare January 23, 2026 18:09
@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

💻 Deploy preview deleted (chore: Sync the translator for otelcol.receiver.prometheus with upstream).

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
@ptodev ptodev force-pushed the ptodev/nhcb-test-otel-branch branch from 5efb471 to dbde71a Compare January 27, 2026 18:28
@ptodev ptodev marked this pull request as ready for review January 27, 2026 18:28
@ptodev ptodev requested review from a team and clayton-cornell as code owners January 27, 2026 18:28
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

🔍 Dependency Review

github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.142.0 (direct) -> v0.142.0 (indirect) — ✅ Safe
  • What changed: The module remains at the same version (v0.142.0) but has been moved from a direct to an indirect dependency in go.mod.
  • Reason: The codebase no longer imports pdatautil directly. The previous usage (e.g., hashing attributes in the Prometheus receiver’s metrics adjuster) was removed along with the entire metrics adjuster implementation.

No code changes are required to adopt this change. The PR already removes the only direct usage.

Evidence:

  • The metrics_adjuster.go file (which used pdatautil.MapHash) was deleted in this PR. It previously contained:
    import (
        ...
        "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil"
    )
    ...
    func getAttributesSignature(m pcommon.Map) [16]byte {
        ...
        return pdatautil.MapHash(clearedMap)
    }
  • The go.mod change reflects removal from direct require and reappearance as indirect:
    - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.142.0
    ...
    + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.142.0 // indirect

No relevant changelog sections apply (no version change).

Notes

  • No other dependency versions changed in this PR; only the pdatautil entry moved from direct to indirect, which is consistent with the removal of its direct usage in the code.

@ptodev ptodev force-pushed the ptodev/nhcb-test-otel-branch branch from deb5bb1 to 2d4ecac Compare January 29, 2026 11:14
Copy link
Contributor

@krajorama krajorama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc part LGTM

@ptodev ptodev force-pushed the ptodev/nhcb-test-otel-branch branch from 5eb68d9 to 37dad5c Compare February 2, 2026 12:10
Copy link
Contributor

@kgeckhart kgeckhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did my best to review what's here mostly for clarity.

@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Feb 4, 2026
ptodev and others added 5 commits February 4, 2026 16:45
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>
@ptodev ptodev force-pushed the ptodev/nhcb-test-otel-branch branch from 9a64343 to d99725d Compare February 4, 2026 17:14
@ptodev ptodev requested a review from kgeckhart February 4, 2026 17:14
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
@ptodev ptodev merged commit 237e985 into main Feb 5, 2026
49 of 50 checks passed
@ptodev ptodev deleted the ptodev/nhcb-test-otel-branch branch February 5, 2026 20:40
@grafana-alloybot grafana-alloybot bot mentioned this pull request Feb 5, 2026
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age type/docs Docs Squad label across all Grafana Labs repos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants