open-telemetry / open-telemetry/opentelemetry-cpp

Preserving timestamps for prometheus exporter

Open
#3,484 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Stale triage/accepted
Dominant language
C++
Stars
1.4k
Forks
632
Avg merge
1d 13h
Merged PRs (30d)
75

Description

I see here that timestamps were explicitly removed from the prometheus exporter. However, shouldn't this be a setting for the user that allows them to choose whether timestamps should be honored or not?

In my case I want to preserve the timestamps that come from the source. How can I achieve that currently?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing pull request 2324 and the current Prometheus exporter behavior. Identify where timestamp handling and exporter configuration are defined, then determine how a user-selectable preservation setting would fit the existing API. Done means source timestamps can be preserved when enabled and the behavior is covered by exporter tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, prometheus
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.