-
Notifications
You must be signed in to change notification settings - Fork 893
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 semantic conventions for GCP resources #3384
Conversation
Do all GCE instances have a well-defined and unique fully qualified hostname? |
I think so, based on https://cloud.google.com/compute/docs/instances/custom-hostname-vm:
Though I suppose this doesn't guarantee uniqueness, because you could set a custom hostname. We would want to provide guidance on handling that to avoid collisions. |
Thanks for the documentation pointer. It looks like the internal DNS name is always defined, and (for projects created since 2018), has the form |
@punya is that just the default DNS name? There could still be a benefit when setting a custom hostname that differs from that default. In that case Documenting how to get the default would be useful too. Do you have a link to where you found that? |
It's a link from your previous comment, https://cloud.google.com/compute/docs/internal-dns |
@punya ah I missed that definition (I just copied the higher level explanation from the custom hostnames doc) Do you think custom hostnames are a reasonable justification for this? |
If it's a hostname in the generic sense( |
There is already In that respect, we probably should have set An alternative could be to make this a config option in the resource detector. I don't know what level of config we can provide in that processor, but something like |
I think that defeats the purpose of semantic conventions; they should have a single well-defined meaning so that backends can reliably interpret them as one thing or the other. If |
Should we consider breaking backwards compatibility in the GCP resource detector, and stop setting |
@punya I don't think there is a need to break the existing convention right away. Could we recommend users switch to one of the new attributes and plan to stop setting It is a bit weird to set the Instance name in 2 places (
|
My apologies, I'll be out of the office for the next 2 weeks. @jsuereth has graciously agreed to handle the remaining review work. |
brief: > | ||
The instance name of a GCE instance. | ||
examples: ['instance-1'] | ||
- id: instance.hostname |
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.
Should this just ref: host.name
instead of define a new field?
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.
Yeah that sounds good, but gcp.gce.instance.name
would actually be the new field that should ref: host.name
(currently host.name
is set to the instance name)
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.
Confirming what we discussed, we use the instance name to set host.name
(also for GKE). We don't currently set the actual hostname anywhere.
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
@jsuereth I added much more description to these fields. I think the original decision to use Instance name as the |
The host.name field in OTel seems to be very vaguely defined so that any of those choices would be fine. I wonder if we should tighten the definition or introduce more clearly defined separate fields like |
@damemi heads up - most likely this PR will be closed, and we'll ask you to resubmit the PR in a new repo, please refer to #3474 (comment). |
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.
Can you move this to https://github.com/open-telemetry/semantic-conventions?
|
Fixes #
Changes
This adds GCP-specific semantic conventions for GCE instances. Specifically, we would like to provide 2 ways of identifying host names: by their GCE instance name and their fully-qualified hostname (see GoogleCloudPlatform/opentelemetry-operations-go#511 for more downstream discussion)
(Following the pattern for AWS in #1099)
Related issues # GoogleCloudPlatform/opentelemetry-operations-go#511
Related OTEP(s) #