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(detector-gcp): collect hostname resource attribute from GCP Metadata API #1364

Merged
merged 5 commits into from
Feb 8, 2023

Conversation

mwear
Copy link
Member

@mwear mwear commented Jan 27, 2023

Which problem is this PR solving?

This PR is mostly for convenience. When working on collecting host-id for non-cloud environments, I was looking at the AWS EC2 Detector and the GCP Detector. I noticed that the EC2 Detector collects both host.name and host.id, and the GCP Detector collects only host.id. I updated the GCP Detector to collect host.name for congruence with the EC2 Detector and also so that GCP users will not have to use the Host Detector, or worry about Detector ordering when collecing host.name and host.id.

Short description of the changes

  • Collect host.name resource attribute in GCP Detector

@mwear mwear requested a review from a team January 27, 2023 21:06
@mwear mwear force-pushed the gcp-detector-hostname branch from 232ade5 to 7869a11 Compare January 27, 2023 21:11
@codecov
Copy link

codecov bot commented Jan 27, 2023

Codecov Report

Merging #1364 (a4dd63d) into main (63e0fc9) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1364      +/-   ##
==========================================
+ Coverage   96.10%   96.11%   +0.01%     
==========================================
  Files          14       16       +2     
  Lines         898      952      +54     
  Branches      192      197       +5     
==========================================
+ Hits          863      915      +52     
- Misses         35       37       +2     
Impacted Files Coverage Δ
...resource-detector-gcp/src/detectors/GcpDetector.ts 96.22% <100.00%> (ø)
...metry-resource-detector-gcp/src/detectors/index.ts 100.00% <0.00%> (ø)

@blumamir blumamir changed the title feat: collect hostname resource attribute from GCP Metadata API feat(detector-gcp): collect hostname resource attribute from GCP Metadata API Feb 7, 2023
@blumamir blumamir merged commit 33c57cc into open-telemetry:main Feb 8, 2023
@dyladan dyladan mentioned this pull request Feb 8, 2023
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