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

WIP: [translator/prometheusremotewrite] Expose PrometheusConverter type, with generated implementation #32665

Conversation

aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented Apr 24, 2024

Description:
Expose the PrometheusConverter type from pkg/translator/prometheusremotewrite (previosly hidden behind the wrapping FromMetrics function), and generate the PrometheusConverter.FromMetrics implementation from templates. This approach lets Prometheus compatible systems such as Grafana Mimir, Thanos, Cortex etc. generate translation code for their own target format.

Also use the PrometheusConverter type from exporter/prometheusremotewriteexporter, to avoid the overhead of unnecessary translation in prometheusremotewrite.FromMetrics.

Link to tracking Issue: #32666

Testing:
I've benchmarked, the results are: TODO

Documentation:

@aknuds1 aknuds1 changed the title [translator/prometheusremotewrite] Expose PrometheusConverter type, with generated implementation WIP: [translator/prometheusremotewrite] Expose PrometheusConverter type, with generated implementation Apr 24, 2024
@aknuds1 aknuds1 force-pushed the arve/prometheusremotewrite-pluggable branch from e7aeb23 to 6c66a68 Compare April 24, 2024 07:18
@aknuds1 aknuds1 force-pushed the arve/prometheusremotewrite-pluggable branch 10 times, most recently from 5142d4c to c4a6cbb Compare April 29, 2024 13:22
@aknuds1 aknuds1 force-pushed the arve/prometheusremotewrite-pluggable branch from c4a6cbb to 7751d5f Compare April 29, 2024 13:23
@aknuds1
Copy link
Contributor Author

aknuds1 commented May 1, 2024

Closing since I've found a better approach, see comment.

@aknuds1 aknuds1 closed this May 1, 2024
@aknuds1 aknuds1 deleted the arve/prometheusremotewrite-pluggable branch May 1, 2024 10:59
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.

1 participant