Skip to content
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

prometheusremotewrite: Move TimeSeries method to timeseries.go #14020

Merged
merged 1 commit into from
May 8, 2024

Conversation

aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented May 1, 2024

To facilitate generating OTel translation code for other Prometheus compatible backends (e.g. Grafana Mimir/Thanos/Cortex), modify the prometheusremotewrite sources slightly so that the PrometheusConverter.TimeSeries method is in a file called timeseries.go. The rationale is to allow other backends to define their own implementation of this method.

The change has no practical effect, it's just code reorganizing.

At the same time taking the opportunity to format metrics_to_prw_test.go via gofumpt -extra (golangci-lint complained about this locally).

@aknuds1 aknuds1 requested a review from jesusvazquez as a code owner May 1, 2024 10:43
@aknuds1 aknuds1 changed the title prometheusremotewrite: Move TimeSeries method to prometheus.go prometheusremotewrite: Move TimeSeries method to timeseries.go May 1, 2024
To facilitate generating OTel translation code for other Prometheus
compatible backends, modify the prometheusremotewrite sources slightly
so that the PrometheusConverter.TimeSeries method is in a file called
timeseries.go. The rationale is to allow other backends to define their
own implementation of this method.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

👍🏽 from my side, but let's wait for @jesusvazquez

Copy link
Member

@jesusvazquez jesusvazquez left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@aknuds1 aknuds1 merged commit 0ba7471 into prometheus:main May 8, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants