OpenTelemetry on Cloud Run does not include task_id
in Monitored Resource
#14925
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
What component of
google-cloud-cpp
is this related to?:google/cloud/opentelemetry
Describe the bug: When inside a Cloud Run environment, the
MonitoredResource
in aCreateTimeSeriesRequest
to the Cloud Monitoring API does not include the necessary fields for thegeneric_task
resource type, and is rejected.To Reproduce
MakeResourceDetector()
to create an OTel Resource object, and usesMakeMonitoringExporter()
to export to Cloud MonitoringExpected behavior: Should follow the well-tested Golang implementation where the
faas.instance
OTel Resource Attribute is mapped toMonitoredResource
task_id
. As theservice.namespace
OTel Resource Attribute is not set by the Resource Detector from within Cloud Run, it should be mapped as an empty string (as in golang implementation), rather than being left absent.What version of
google-cloud-cpp
are you using?:2.3.0
Example OTel Resource Attributes from within Cloud Run:
I have a draft fix in pull request #14923
The text was updated successfully, but these errors were encountered: