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] Customising service metrics with additional views, reader and server #7696

Closed

Conversation

ptodev
Copy link

@ptodev ptodev commented May 18, 2023

There are two changes in the PR:

  • Passing a custom metric reader and metric views to the service.New function.
  • Adding a configuration option to disable the Collector's /metric server.

This could be useful to users of the Collector who want to leverage the functionality of the service module, but who need to extend it with their own metric server, views and readers.

The change in this PR was discussed recently on the CNCF slack channel for the collector, on this thread.

Alternative solutions to this problem have already been discussed in #4970. So far they have mostly been turned down because overriding telemetry settings could contradict other settings in the service config.

There is one potential issue with this change. Unfortunately, the useExternalMetricsServer could indeed contradict the config. If the config specifies a telemetry metrics address and useExternalMetricsServer = true , then Collector wouldn't start a Prometheus server. However, if you think passing views and metric readers is ok, I could think of a way to minimise the contradictions which useExternalMetricsServer would introduce.

On Slack it was also mentioned that there is work underway to include metric readers and views in the config, and that this change could potentially contradict them (or at least provide another way to configure the same thing):

  • I agree that if views are configurable through the config, the "views" part of this PR may not be necessary.
  • Even if metric readers are configurable through config, there is still value in being able to pass custom ones as this change does, because then the Collector and the code outside of it could share the same Prometheus Registerer. Also, I don't think it would contradict the config in any way.

I would be happy to add a changelog entry, tests and documentation if needed. There is currently no GitHub issue created for this particular approach, but I would be happy to create one if needed as well.

@ptodev ptodev requested review from a team and Aneurysm9 May 18, 2023 21:31
@ptodev ptodev changed the title Customising service metrics with additional views, reader and server [WIP] Customising service metrics with additional views, reader and server May 18, 2023
@mx-psi mx-psi requested a review from bogdandrutu May 19, 2023 06:53
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2023

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 Jun 3, 2023
@ptodev ptodev force-pushed the customize-service-telemetry branch from 952ac3d to 42e0fbb Compare June 7, 2023 13:26
@github-actions github-actions bot removed the Stale label Jun 8, 2023
@ptodev ptodev force-pushed the customize-service-telemetry branch from 42e0fbb to c379a56 Compare June 14, 2023 11:35
@ptodev
Copy link
Author

ptodev commented Jun 14, 2023

Hello, if a maintainer has a chance to review and opine whether this approach has potential, it would be much appreciated please :)

@mx-psi
Copy link
Member

mx-psi commented Jun 15, 2023

@open-telemetry/collector-maintainers any thoughts?

@github-actions
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 Jun 30, 2023
@mx-psi mx-psi removed the Stale label Jun 30, 2023
@github-actions
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 Jul 15, 2023
@mx-psi
Copy link
Member

mx-psi commented Jul 17, 2023

ping @open-telemetry/collector-maintainers

@github-actions github-actions bot removed the Stale label Jul 18, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

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 2, 2023
@github-actions
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 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants