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

Add a flag to disable exporter metrics #82

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

isker
Copy link
Contributor

@isker isker commented Oct 15, 2024

The name of the flag and how it's implemented are cribbed from some other projects like node_exporter and systemd_exporter, though our situation is simpler than theirs.

Closes #8.
Closes #71 (by way of obsoleting it).

I tested this locally by ensuring that this includes version and exporter metrics (the ECS metrics of course aren't produced):

ECS_CONTAINER_METADATA_URI_V4=foobar go run main.go

While this only includes version metrics:

ECS_CONTAINER_METADATA_URI_V4=foobar go run main.go --web.disable-exporter-metrics

The name of the flag and how it's implemented are cribbed from some
other projects like node_exporter and systemd_exporter, though our
situation is simpler than theirs.

Signed-off-by: Ian Kerins <git@isk.haus>
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

I typically prefer positive flags, but since this is the established pattern we'll stick to it for now.

@SuperQ SuperQ merged commit 67ebe7a into prometheus-community:main Oct 16, 2024
4 checks passed
@SuperQ
Copy link
Contributor

SuperQ commented Oct 17, 2024

This exporter acts more as a sidecar if I understand it correctly. I wonder if we should disable this by default, or perhaps tune the defaults to expose fewer metrics.

@isker
Copy link
Contributor Author

isker commented Oct 17, 2024

It is a sidecar on every ECS task (analogous to k8s pod), as it exports metrics from an API only privately available within the task's network.

That seems not unreasonable to me.

@isker isker deleted the disable-exporter-metrics branch October 17, 2024 11:57
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.

Add option to disable exporter metrics
2 participants