-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[processor/resourcedetection] Add new GCP resource attributes for GCE instance name/hostname #24598
[processor/resourcedetection] Add new GCP resource attributes for GCE instance name/hostname #24598
Conversation
d3191a4
to
dd71779
Compare
Note: this will conflict with #23681 when one of them merges. Also, like that one, these will eventually be updated to use semantic convention library constants instead of string literals for the attributes |
dd71779
to
7922981
Compare
description: The name of the GCE instance. | ||
type: string | ||
enabled: true | ||
gcp.gce.instance.hostname: | ||
description: The hostname of the GCE instance. | ||
type: string | ||
enabled: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned in #23681 (comment), new resource attributes should be added as optional initially. Otherwise, it's considered a breaking change. If we want to make them enabled by default, we will need to apply a warning to notify users in advance after they are added as optional. We'll get an option to add such warnings in metadata.yaml
once #19174 is resolved. I've done some prerequisite work for that, and will add the warnings option next week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, got confused because we reverted that with #23681 (comment), but I forgot that's because Cloud Run Jobs were totally new. I updated this to disable the new GCE attributes by default
… instance name/hostname
7922981
to
8c15e37
Compare
* faas.id (instance id) | ||
* faas.name (service name) | ||
* gcp.cloud_run.job.execution ("my-service-ajg89") | ||
* gcp.cloud_run.job.task_index ("0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pardon my ignorance here, but should the new resource attributes be included in this list, or are they irrelevant here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The attributes for cloud run jobs should have been added in #23681, and they're enabled by default, so I do think so.
The optional gcp.gce.instance.hostname
and gcp.gce.instance.name
(this PR, disabled by default) I wasn't sure about, so I labeled them as optional in the readme.
/easycla |
Description:
This uses new detector functions from GoogleCloudPlatform/opentelemetry-operations-go#669 to update the GCP resource detector to add new GCE-specific attributes for hostname and instance name. These attributes are meant to more clearly express their intent in specific context to GCE. See https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/cloud-provider/gcp/gce.md
Link to tracking Issue: GoogleCloudPlatform/opentelemetry-operations-go#511
Testing: unit tests updated, plus downstream unit and integration tests
Documentation: matches semantic conventions