You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module provides automatic instrumentation for the [`aws-sdk` v2](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/) and [`@aws-sdk` v3](https://github.com/aws/aws-sdk-js-v3) modules, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle.
8
+
This module provides automatic instrumentation for the [AWS SDK for JavaScript v3](https://github.com/aws/aws-sdk-js-v3) modules, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle.
9
9
10
10
If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience.
|`rpc.method`| string | he name of the operation corresponding to the request, as returned by the AWS SDK. If the SDK does not provide a way to retrieve a name, the name of the command SHOULD be used, removing the suffix `Command` if present, resulting in a PascalCase name with no spaces. |`PutObject`|
68
67
|`rpc.service`| string | The name of the service to which a request is made, as returned by the AWS SDK. If the SDK does not provide a away to retrieve a name, the name of the SDK's client interface for a service SHOULD be used, removing the suffix `Client` if present, resulting in a PascalCase name with no spaces. |`S3`, `DynamoDB`, `Route53`|
69
68
|`aws.region`| string | Region name for the request | "eu-west-1" |
70
69
71
-
### V2 attributes
72
-
73
-
In addition to the above attributes, the instrumentation also collect the following for V2 ONLY:
74
-
| Attribute Name | Type | Description | Example |
75
-
| -------------- | ---- | ----------- | ------- |
76
-
|`aws.operation`| string | The method name for the request. | for `SQS.sendMessage(...)` the operation is "sendMessage" |
77
-
|`aws.signature.version`| string | AWS version of authentication signature on the request. | "v4" |
78
-
|`aws.service.api`| string | The SDK class name for the service | "SQS" |
79
-
|`aws.service.identifier`| string | Identifier for the service in the SDK | "sqs" |
80
-
|`aws.service.name`| string | Abbreviation name for the service | "Amazon SQS" |
81
-
|`aws.request.id`| uuid | Request unique id, as returned from aws on response | "01234567-89ab-cdef-0123-456789abcdef" |
82
-
83
70
### Custom User Attributes
84
71
85
-
The instrumentation user can configure a `preRequestHook` function which will be called before each request, with a normalized request object (across v2 and v3) and the corresponding span.
72
+
The instrumentation user can configure a `preRequestHook` function which will be called before each request, with a normalized request object and the corresponding span.
86
73
This hook can be used to add custom attributes to the span with any logic.
87
74
For example, user can add interesting attributes from the `request.params`, and write custom logic based on the service and operation.
0 commit comments