Description
Is your feature request related to a problem? Please describe.
We use the cloud.account.id
in our observability tools to categorize telemetry data. We're using multiple AWS accounts, one per team, and this allows to filter telemetry by team.
Describe the solution you'd like
The current instrumentation for AWS Lambda sets the cloud.account.id
attribute (and others) on traces. For logs however, this is not the case.
Describe alternatives you've considered
I've tried to use the aws-resource from https://github.com/open-telemetry/opentelemetry-java-contrib, but that also doesn't add the cloud.account.id
, see here:
https://github.com/open-telemetry/opentelemetry-java-contrib/blob/65179dc9dbf5b781e517f29d59655233cd87000f/aws-resources/src/main/java/io/opentelemetry/contrib/aws/resource/LambdaResource.java#L41-L64
As a current workaround, we're setting this attribute via the otel.resource.attributes
setting in our CDK code:
OTEL_RESOURCE_ATTRIBUTES: `cloud.account.id=${this.account}`,
Additional context
No response