Skip to content

Conversation

@dashpole
Copy link
Contributor

export OTEL_EXPORTER_OTLP_HEADERS=X-Goog-User-Project=$PROJECT_ID seemed to be required for me, even though I didn't need to do that for python or JS. Not sure why there is a difference

@dashpole dashpole requested a review from a team as a code owner January 22, 2025 21:10
@dashpole dashpole requested a review from psx95 January 22, 2025 21:10
@codecov
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.02%. Comparing base (4caace7) to head (fa2bcdf).
Report is 115 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1005      +/-   ##
==========================================
+ Coverage   61.03%   64.02%   +2.98%     
==========================================
  Files          56       57       +1     
  Lines        5903     6018     +115     
==========================================
+ Hits         3603     3853     +250     
+ Misses       2143     2004     -139     
- Partials      157      161       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@psx95
Copy link
Contributor

psx95 commented Jan 22, 2025

export OTEL_EXPORTER_OTLP_HEADERS=X-Goog-User-Project=$PROJECT_ID seemed to be required for me, even though I didn't need to do that for python or JS. Not sure why there is a difference

One possible cause might be that ADC implementation in Go is not able to figure out the quota project ID.

# export necessary OTEL environment variables
export PROJECT_ID=<project-id>
export OTEL_EXPORTER_OTLP_ENDPOINT=<endpoint>
export OTEL_RESOURCE_ATTRIBUTES="gcp.project_id=$PROJECT_ID,service.name=otlp-sample,service.instance.id=1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be enhanced with resource detectors ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean. Other than service.instance.id, you can't detect these attributes

@dashpole dashpole merged commit df8d75a into GoogleCloudPlatform:main Jan 23, 2025
29 checks passed
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.

2 participants