Skip to content

prometheusreceiver: Make use of created timestamp from prometheus #36473

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

Closed
dashpole opened this issue Nov 20, 2024 · 4 comments · Fixed by #36660
Closed

prometheusreceiver: Make use of created timestamp from prometheus #36473

dashpole opened this issue Nov 20, 2024 · 4 comments · Fixed by #36660
Assignees
Labels
enhancement New feature or request receiver/prometheus Prometheus receiver

Comments

@dashpole
Copy link
Contributor

Component(s)

receiver/prometheus

Describe the issue you're reporting

Prometheus now parses the timestamp for us: prometheus/prometheus#14356. We need to implement the CreatedTimestampAppender interface (with the AppendCTZeroSample method and AppendHistogramCTZeroSample methods) to get access to it.

We also need to set EnableCreatedTimestampZeroIngestion to true in the scrape manager for the AppendCT* methods to be called.

We should remove the receiver.prometheusreceiver.UseCreatedMetric feature gate, and associated code after this is complete.

cc @open-telemetry/wg-prometheus

@dashpole dashpole added needs triage New item requiring triage enhancement New feature or request labels Nov 20, 2024
@dashpole
Copy link
Contributor Author

cc @ridwanmsharif
since you are also interested in created timestamp support

@dashpole dashpole added help wanted Extra attention is needed and removed needs triage New item requiring triage labels Nov 20, 2024
@bacherfl
Copy link
Contributor

If this issue is still available, I would like to work on this

@dashpole dashpole removed the help wanted Extra attention is needed label Dec 2, 2024
@dashpole
Copy link
Contributor Author

dashpole commented Dec 2, 2024

Great! Let me know if you run into any issues

Copy link
Contributor

Pinging code owners for receiver/prometheus: @Aneurysm9 @dashpole. See Adding Labels via Comments if you do not have permissions to add labels yourself. For example, comment '/label priority:p2 -needs-triaged' to set the priority and remove the needs-triaged label.

MovieStoreGuy pushed a commit that referenced this issue Feb 20, 2025
…36660)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR implements the `AppendCTZeroSample` and
`AppendHistogramCTZeroSample` methods which can be called by prometheus
to pass through the creation timestamp of a metric

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #36473

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Added unit tests

---------

Signed-off-by: Florian Bacher <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request receiver/prometheus Prometheus receiver
Projects
None yet
3 participants