Closed raphaelauv closed 2 years ago
The doc precise that the cloud trace fields (service and version) for filter in the UI are only for App engine
Service | (App Engine only) The App Engine service that handled the request. For more information, go to App Engine.
Version | (App Engine only) The version of the application that handled the request.
I've had success making this work in the past by taking advantage of the app engine tag naming convention:
{
"g.co/gae/app/module": $K_SERVICE,
"g.co/gae/app/version", $K_REVISION
}
I would not count on this being stable/preferred, but it may be a workable hack.
Cloud Trace does not have the notion of a Resource (or a ResourceAttribute), and because there is a strict limit of 32 labels per span, the library by default does not copy ResourceAttributes to Span Labels, but this is configurable using the resource_regex
parameter like so:
configure_exporter(CloudTraceSpanExporter(resource_regex="service.*"))
More detail is available in the docs for the resource_regex
argument.
GCP Cloud run does not seem to respect the ResourceAttributes of OTEL
running this will give span in cloud trace , but the ResourceAttributes do not appear in the filter options of cloud run