open-telemetry / semantic-conventions

Defines standards for generating consistent, accessible telemetry across a variety of domains
Apache License 2.0
290 stars 176 forks source link

Adding aws.region span attribute to the spec #1113

Open Ma-Ba opened 2 years ago

Ma-Ba commented 2 years ago

We noticed that the AWS SDK instrumentation in various languages sets a (client) span attribute named aws.region which is currently not part of the spec.

I found the following instrumenation libraries that set aws.region:

Currently, the spec contains the cloud.region resource attribute intended for server-side spans and faas.invoked_region for client-side spans of FaaS invocations. The latter is therefore not suitable for e.g. calls to DynamoDB using the AWS SDK.

I'd like to propose the following:

I am happy to create a PR after the discussion of this issue.

Oberon00 commented 2 years ago

invoked_region might not be the ideal name if we also want to use the attribute to e.g. record the region from which some FaaS invocation was triggered. Maybe cloud.peer_region or cloud.remote_region?

Oberon00 commented 2 years ago

We might also want to consider the (invoked/peer/remote) account_id here as a complement to the callers cloud.account_id, but that might be considered a separate issue.

arminru commented 2 years ago

@jsuereth can this be added to open-telemetry/opentelemetry-specification#2753?

jordankay13 commented 9 months ago

I'm coming here from

I would argue against documenting the current behaviour - aws.region is too similar to cloud.region and is incredibly confusing, especially for new users. I quite like the idea of having a cloud.peer_region attribute.

Thank you