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

otel-collector config to populate FAAS name #42

Merged
merged 1 commit into from
Dec 24, 2023

Conversation

tcnghia
Copy link
Collaborator

@tcnghia tcnghia commented Dec 24, 2023

The gcp resource detection plugin populates the attribute faas.name to Cloud Run Service/Job, and Cloud Function name, which makes it a nice way to standardize on naming (see). Using env var is less convenient for this purpose because Cloud Run Service name is $K_SERVICE and for Cloud Run Job it's $CLOUD_RUN_JOB.

The googlemanagedprometheus exporter consumes service.name attribute and create a resource label named job with this value when uploading metrics. There is no customization of this. (see).

This PR plumbs faas.name into service.name so we can get a resource label with the Cloud Run Service or Job name on all our exported metrics. Also dropping instance id because this is an unbounded dimension, and even worse when a lot of scaling-to-zero happens.

Signed-off-by: Nghia Tran <tcnghia@gmail.com>
@imjasonh imjasonh merged commit 4aba832 into chainguard-dev:main Dec 24, 2023
21 checks passed
@mattmoor
Copy link
Member

nice :)

tcnghia added a commit that referenced this pull request Dec 24, 2023
This makes use of what we added in #42

Signed-off-by: Nghia Tran <tcnghia@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