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

feat: add projects query #243

Merged
merged 4 commits into from
Oct 25, 2023

Conversation

fandujar
Copy link
Contributor

This PR introduces a new flag to initialization called google.projects.filter which allows the exporter to query projects on a GCP Organization using labels and fields.

Example:

--google.projects.filter="labels.monitoring=true AND lifecycleState=ACTIVE"

I designed this to be a complement to the current projectID flag.
In my case, I have thousands of projects and that's why I wanted it to be flexible.

@fandujar fandujar force-pushed the feat/add_projects_query branch from 21c19b4 to 89307f6 Compare July 14, 2023 19:35
@fandujar
Copy link
Contributor Author

@SuperQ Could you take a look on this PR?

@fandujar fandujar force-pushed the feat/add_projects_query branch 4 times, most recently from 420673d to 3621bfc Compare October 10, 2023 14:12
Signed-off-by: Filipe Andujar <filipeandujar@gmail.com>
@fandujar fandujar force-pushed the feat/add_projects_query branch from 3621bfc to 26fc30c Compare October 10, 2023 14:13
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.

Can you update the README with an example use of the use and a link to the Google documentation related to what's possible in the query language?

stackdriver_exporter.go Outdated Show resolved Hide resolved
Signed-off-by: Filipe Andujar <filipeandujar@gmail.com>
Signed-off-by: Filipe Andujar <filipeandujar@gmail.com>
@fandujar
Copy link
Contributor Author

@SuperQ can you review it again, please? Sorry for the delay

stackdriver_exporter.go Outdated Show resolved Hide resolved
Signed-off-by: Filipe Andujar <filipeandujar@gmail.com>
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.

LGTM

@SuperQ SuperQ merged commit b705b5c into prometheus-community:master Oct 25, 2023
2 checks passed
@netzere
Copy link

netzere commented Feb 4, 2024

Hi @SuperQ,
Is there a plan to release a new version so we can use this feature?

@netzere netzere mentioned this pull request Feb 8, 2024
SuperQ added a commit that referenced this pull request Mar 7, 2024
* [FEATURE] Add projects query #243
* [ENHANCEMENT] Refactor delta logic for library usage #190

Signed-off-by: SuperQ <superq@gmail.com>
@SuperQ SuperQ mentioned this pull request Mar 7, 2024
SuperQ added a commit that referenced this pull request Mar 7, 2024
* Release v0.15.0

* [FEATURE] Add projects query #243
* [ENHANCEMENT] Refactor delta logic for library usage #190

Signed-off-by: SuperQ <superq@gmail.com>

* Bump Go modules.

Signed-off-by: SuperQ <superq@gmail.com>

---------

Signed-off-by: SuperQ <superq@gmail.com>
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.

3 participants