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

[target-allocator] Remove json conversion from /scrape_configs #1411

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kristinapathak
Copy link
Contributor

@kristinapathak kristinapathak commented Jan 31, 2023

fixes #1404

This change is breaking in that the scrape configs endpoint will now response with YAML instead of JSON. However, the prometheus receiver which sends requests to /scrape_configs is currently using yam.Unmarshal: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/72d590e8e76a18bbec6d4ce8b6200520c5e94732/receiver/prometheusreceiver/metrics_receiver.go#L205-L233

This doesn't give us a large performance gain (compared to using jsoniter), but it is noticeable in benchmarks:
scrapeconfig_bench_results.txt

@matej-g
Copy link
Contributor

matej-g commented Feb 10, 2023

Is anything preventing this and #1410 from moving forward? Happy to help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[target-allocator] Remove yaml to json conversion for ScrapeConfigs endpoint
2 participants