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

fix: support aws_tag_select with non-standard resource id in metric #648

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

msvticket
Copy link
Contributor

@msvticket msvticket commented Feb 8, 2024

Fixes #268

@matthiasr I'll add an update to the README when I get the word that the code is at least in the ball park ready to be merged.

@msvticket msvticket force-pushed the resourceidmapping branch 2 times, most recently from ae9553e to fb5a6f8 Compare February 8, 2024 17:45
Copy link
Contributor

@matthiasr matthiasr left a comment

Choose a reason for hiding this comment

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

Thank you for tackling this! I like giving users the option to supply patterns.

I see that we can both encode known patterns in ARN_RESOURCE_ID_REGEXP_FOR_TYPE and allow configuring custom patterns. What guidance can we give future contributors on whether they should add patterns to the code or the examples?

Would it be "good enough" to keep the exporter oblivious of specific patterns, and only add the elasticloadbalancing:targetgroup to the examples?

@matthiasr matthiasr added bug metrics-configuration How to configure specific metrics for collection java Pull requests that update Java code labels Mar 3, 2024
@matthiasr
Copy link
Contributor

Will this replace the workaround outlined in #571 or is it separate?

@msvticket
Copy link
Contributor Author

Thank you for tackling this! I like giving users the option to supply patterns.

I see that we can both encode known patterns in ARN_RESOURCE_ID_REGEXP_FOR_TYPE and allow configuring custom patterns. What guidance can we give future contributors on whether they should add patterns to the code or the examples?

Would it be "good enough" to keep the exporter oblivious of specific patterns, and only add the elasticloadbalancing:targetgroup to the examples?

For me it would be good enough, but for the general user it would certainly be preferable for as a much as possible to work out of the box.

@msvticket
Copy link
Contributor Author

Will this replace the workaround outlined in #571 or is it separate?

It would replace the label_replace trick.

@matthiasr
Copy link
Contributor

general user it would certainly be preferable for as a much as possible to work out of the box

I'm afraid this exporter does not work "out of the box" at all 😬

one does not simply use cloudwatch exporter out of the box

The example configurations are the main way to "get started", and where we do collect service specifics, so I think to keep things clear and maintainable going forward, I would rather remove ARN_RESOURCE_ID_REGEXP_FOR_TYPE and add it to the relevant example configurations instead.

@matthiasr
Copy link
Contributor

This has the added benefit of showing how to use it, so that hopefully users for other services can help themselves without having to wait for exporter code changes and releases.

@matthiasr
Copy link
Contributor

matthiasr commented Mar 3, 2024 via email

@msvticket msvticket force-pushed the resourceidmapping branch from fb5a6f8 to d181c72 Compare March 4, 2024 12:32
@msvticket
Copy link
Contributor Author

I have now removed ARN_RESOURCE_ID_REGEXP_FOR_TYPE from the code. I'll look at documentation soon

@msvticket
Copy link
Contributor Author

Now I have documented the new option and updated a couple of examples to use it

@matthiasr
Copy link
Contributor

Awesome, thank you! Merging despite the build_image failure – build succeeded, and the Docker version issue is resolved in master.

@matthiasr matthiasr merged commit 64e52db into prometheus:master Mar 22, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug java Pull requests that update Java code metrics-configuration How to configure specific metrics for collection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ALB target group tag selections failing due to resource id
2 participants