<!--- Hugo front matter used to generate the website version of this page:
linkTitle: AWS SDK
--->

# Semantic conventions for AWS SDK client spans

**Status**: [Development][DocumentStatus]

## Context propagation

See [compatibility](../non-normative/compatibility/aws.md#context-propagation).

## AWS SDK spans

<!-- prettier-ignore-start -->
<!-- semconv span.aws.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

This span describes an AWS SDK client call.

**Span name** MUST be of the format `Service.Operation` as per the
AWS HTTP API, e.g., `DynamoDB.GetItem`, `S3.ListBuckets`. This is
equivalent to concatenating `rpc.service` and `rpc.method` with `.` and
consistent with the naming guidelines for RPC client spans.

AWS SDK span attributes are based on the request or response parameters
in AWS SDK API calls. The conventions have been collected over time based
on feedback from AWS users of tracing and will continue to increase as new
interesting conventions are found.

**Span kind** SHOULD be `CLIENT`.

**Span status** SHOULD follow the [Recording Errors](/docs/general/recording-errors.md) document.

| Attribute  | Type | Description  | Examples  | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`rpc.system`](/docs/attributes-registry/rpc.md) | string | The value `aws-api`. | `aws-api` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`aws.extended_request_id`](/docs/attributes-registry/aws.md) | string | The AWS extended request ID as returned in the response header `x-amz-id-2`. | `wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=` | `Conditionally Required` If available. | ![Development](https://img.shields.io/badge/-development-blue) |
| [`aws.request_id`](/docs/attributes-registry/aws.md) | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`rpc.method`](/docs/attributes-registry/rpc.md) | string | The name of the operation corresponding to the request, as returned by the AWS SDK [1] | `GetItem`; `PutItem` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The name of the service to which a request is made, as returned by the AWS SDK. [2] | `DynamoDB`; `S3` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |

**[1] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).

**[2] `rpc.service`:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).

---

`rpc.system` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value  | Description | Stability |
|---|---|---|
| `apache_dubbo` | Apache Dubbo | ![Development](https://img.shields.io/badge/-development-blue) |
| `connect_rpc` | Connect RPC | ![Development](https://img.shields.io/badge/-development-blue) |
| `dotnet_wcf` | .NET WCF | ![Development](https://img.shields.io/badge/-development-blue) |
| `grpc` | gRPC | ![Development](https://img.shields.io/badge/-development-blue) |
| `java_rmi` | Java RMI | ![Development](https://img.shields.io/badge/-development-blue) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
<!-- prettier-ignore-end -->

## AWS service specific attributes

The following Semantic Conventions extend the general AWS SDK attributes for specific AWS services:

- [AWS DynamoDB](/docs/database/dynamodb.md): Semantic Conventions for _AWS DynamoDB_.
- [AWS S3](/docs/object-stores/s3.md): Semantic Conventions for _AWS S3_.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
