In order to map to generic_task on cloud run, cloud functions, and GAE, we need to map from faas.name and faas.id to generic_task, similar to what we do for service.name and service.instance.id
Example in golang:
https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/ef9b15e0c12cee086ab8a6e7439e64258b029a3b/internal/resourcemapping/resourcemapping.go#L228-L235
Current implementation:
|
# fallback to generic_task |
|
if ( |
|
ResourceAttributes.SERVICE_NAME in attrs |
|
and ResourceAttributes.SERVICE_INSTANCE_ID in attrs |
|
): |
|
mr = _create_monitored_resource(_constants.GENERIC_TASK, attrs) |
In order to map to
generic_taskon cloud run, cloud functions, and GAE, we need to map fromfaas.nameandfaas.idtogeneric_task, similar to what we do forservice.nameandservice.instance.idExample in golang:
https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/ef9b15e0c12cee086ab8a6e7439e64258b029a3b/internal/resourcemapping/resourcemapping.go#L228-L235
Current implementation:
opentelemetry-operations-python/opentelemetry-resourcedetector-gcp/src/opentelemetry/resourcedetector/gcp_resource_detector/_mapping.py
Lines 168 to 173 in b0ca7de