-
Notifications
You must be signed in to change notification settings - Fork 104
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
GCE to also get hostname #511
Comments
That seems reasonable to me. Feel free to add it as GCEHostHostname or GCEHostname. As a note, GCE attributes are not accessible on GKE if you are using workload identity (or autopilot, which uses workload identity). |
In the collector, we need to make sure failure to obtain this information does not cause resource detection to fail entirely. |
@dashpole as a side note, should we deprecate |
I just realized they changed the host name attributes recently: open-telemetry/opentelemetry-specification#838. It appears we can only have either the name of the host, or the hostname of the instance as a semantic convention. I assume hostname and instance name are generally significantly different? |
In this case I think they are not that much of the difference. Actually, exposing GCE hostname would leave users with a more flexible of choices: while GCE on GKE expose hostname instead of instance name, users can use In resourcedetection processor we can add a fallback from instance name to hostname, wdyt? |
WDYM about the The instance name is critical when running on GCE, though... I think we need to find another place to put it before replacing it with hostname. |
The system detector doesn't use GCE metadata server, it picks the hostname locally if used with |
In this case, wouldn't we be able to get the cluster node name through the API server? AFAIK,
Changing the |
Thanks for the PR @nhamlh. We'll try to get this reviewed and merged soon |
I agree with mx-psi above. I would prefer to see this added to the specification before adding it to the resource detector. |
To summarize, we can't change the value of The change in #515 alone won't break anything, because that's just adding the new method to the detector. For that reason, I think we could go ahead and merge #515 without any spec changes, but adding the new labels by default in the collector processor should have the spec change first. Does that sound right to everyone? |
Opened open-telemetry/opentelemetry-specification#3384 upstream to add |
With open-telemetry/semantic-conventions#15 merged, we will be using the 2 new attributes mentioned above (once a new semconv release is published) |
Opened #669 |
… instance name/hostname (#24598) **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 --------- Co-authored-by: David Ashpole <[email protected]>
For our usecase, we're running on GKE and would love to also have hostname of GCE requested and populated to otel-collector. Currently, the HostName returns InstanceName instead of hostname:
opentelemetry-operations-go/detectors/gcp/gce.go
Lines 41 to 44 in ca90414
I just wonder if there's any reason blocking adding it? If not, I can open a PR for this.
The text was updated successfully, but these errors were encountered: