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

[receiver/prometheus] feat: add Prometheus API server #33875

Merged
merged 44 commits into from
Mar 12, 2025

Conversation

gracewehner
Copy link
Contributor

Description:

This is a new PR instead of this one: #32646 which has more relevant discussion.
This PR adds the Prometheus API server as part of the Prometheus receiver if enabled through the receiver config.
It supports calling the /config, /targets, /targets/metadata, /scrape_pools, and /metrics paths for more debugging information about the underlying Prometheus scrape manager and discovery manager.

Link to tracking Issue:
open-telemetry/prometheus-interoperability-spec#63

Testing:
Added tests for the prometheus receiver configuration, for each path that the API supports, and for the server shutting down correctly. Also tested out with running the opentelemetry-collector agent with the prometheus receiver.

Documentation:
Added to the prometheus receiver README about how to configure the setting.

@gracewehner gracewehner requested a review from dashpole as a code owner July 3, 2024 00:03
@gracewehner gracewehner requested a review from a team July 3, 2024 00:03
@github-actions github-actions bot added the receiver/prometheus Prometheus receiver label Jul 3, 2024
@github-actions github-actions bot requested a review from Aneurysm9 July 3, 2024 00:03
Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

lgtm otherwise

@dashpole
Copy link
Contributor

Sorry for the slow review. Getting back from vacation

@dashpole
Copy link
Contributor

FYI @jesusvazquez

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Aug 14, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Aug 28, 2024
@gracewehner
Copy link
Contributor Author

Thanks @dashpole I have taken the latest and things look good with the changes. For all the tests to pass, running make gotidy updated other files, but I can revert those and just have the prometheusreceiver changes if that's better

@github-actions github-actions bot removed the Stale label Feb 14, 2025
@atoulme
Copy link
Contributor

atoulme commented Feb 20, 2025

Please resolve conflicts?

@atoulme
Copy link
Contributor

atoulme commented Mar 5, 2025

Please resolve conflicts. All go.mod files of other components should not be touched, afaict.

@gracewehner
Copy link
Contributor Author

Resolved the conflicts, but the other go.mod files seem to be due to those also depending on the prometheusreceiver in the go.mod, so it's adding indirect dependencies to those files and the go.sum files

@gracewehner
Copy link
Contributor Author

Thanks @atoulme all tests are passing and there aren't any merge conflicts right now

@atoulme atoulme merged commit 7445a71 into open-telemetry:main Mar 12, 2025
171 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 12, 2025
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.

5 participants