-
Notifications
You must be signed in to change notification settings - Fork 44
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 option for additional resource attributes with regex to trace exporter #145
Add option for additional resource attributes with regex to trace exporter #145
Conversation
Can you remove the |
The [OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable) allows one to specify additional attributes with the special environmental variable OTEL_RESOURCE_ATTRIBUTES. This includes those attributes into the span exported to GCP. Signed-off-by: David Pollack <david@da3.net>
ed00f41
to
377fdbe
Compare
opentelemetry-exporter-gcp-trace/src/opentelemetry/exporter/cloud_trace/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-exporter-gcp-trace/src/opentelemetry/exporter/cloud_trace/__init__.py
Outdated
Show resolved
Hide resolved
/gcbrun |
@aabmass I think this is ready now |
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.
Nice, looks good! Just add back the GKE container case and we should be good
opentelemetry-exporter-gcp-trace/src/opentelemetry/exporter/cloud_trace/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-exporter-gcp-trace/src/opentelemetry/exporter/cloud_trace/__init__.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
With regards to the failing lint on ci. I am not getting this on my local machine. Not sure what is going on there. |
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.
Thanks for working through my comments, LGTM!
/gcbrun |
@dhpollack could you rename this PR to something more descriptive of what we landed on, and add an entry to the changelog file? I'll merge after that 😃 |
@aabmass done! Thanks for all the help. |
/gcbrun |
The OpenTelemetry Specification allows one to specify additional attributes with the special environmental variable
OTEL_RESOURCE_ATTRIBUTES
. This includes those attributes into the span exported to GCP.The goal of this PR is to easy add "global" attributes to all spans in a given service so that they can be filtered easily in GCP. But also it is not intuitive that you can add these attributes to spans, but they don't get exported with the
CloudTraceSpanExporter
.Signed-off-by: David Pollack david@da3.net