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
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-nodejs-<architecture\>-ver-1-8-0:2|Contains [OpenTelemetry for JavaScript v1.8.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/stable%2Fv1.8.0) with [Lambda instrumentation v0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/instrumentation-aws-lambda-v0.34.0) <br/><br/> Contains the [ADOT Collector for Lambda v0.25.0](https://github.com/aws-observability/aws-otel-collector/releases/tag/pkg%2Flambdacomponents%2Fv0.25.1)|
32
+
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-nodejs-<architecture\>-ver-1-8-0:2|Contains [OpenTelemetry for JavaScript v1.8.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/v1.8.0) with [Lambda instrumentation v0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/instrumentation-aws-lambda-v0.34.0) <br/><br/> Contains the [ADOT Collector for Lambda v0.25.0](https://github.com/aws-observability/aws-otel-collector/releases/tag/pkg%2Flambdacomponents%2Fv0.25.1)|
33
33
34
34
### Enable auto-instrumentation for your Lambda function
35
35
To enable the AWS Distro for OpenTelemetry in your Lambda function, you need to add and configure the layer, and then enable tracing.
Copy file name to clipboardExpand all lines: src/docs/getting-started/x-ray.mdx
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,14 +186,23 @@ exporters:
186
186
187
187
The attributes in this section are translated into the AWS resource field `cloudwatch_logs`. This resource field is used to correlate Cloudwatch Log Groups with the segments associated with it. This correlation can be explored when analyzing individual traces in the X-Ray console.
188
188
189
+
If an attribute is not specified, then the exporter's aws_log_groups field will be used if available.
190
+
189
191
| OTel Attributes env var | X-Ray data model field | Notes |
| aws.log.group.names | cloudwatch_logs.log_group | If both `aws.log.group.arns` and `aws.log.group.names` are defined, precedence is given to `aws.log.group.arns` |
194
+
| aws.log.group.names | cloudwatch_logs.log_group | Precedence is given in the order of `aws.log.group.arns`, `aws.log.group.names`, then the exporter config's `aws_log_groups`.|
195
+
196
+
##### Using Config to set Cloud Watch Log Group Names
197
+
198
+
```yaml lineNumbers=true
199
+
awsxray:
200
+
aws_log_groups: ["group1", "group2"]
201
+
```
193
202
194
-
Obs.: These resource attributes are of type array and cannot be set using the OTEL_RESOURCE_ATTRIBUTES environment variable. Currently you have to setup this resource attribute programatically.
203
+
Obs.: These resource attributes are of type array and cannot be set using the OTEL_RESOURCE_ATTRIBUTES environment variable. Currently you have to setup this resource attribute programatically or by config.
195
204
196
-
See [AWS X-Ray Segment Documents](https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html) for more information on the AWS X-Ray data model. See [OpenTelemetry data model spec](https://github.com/open-telemetry/opentelemetry-specification) for more information on OpenTelemetry data model. See [X-Ray Logging Configuration](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-java-configuration.html#xray-sdk-java-configuration-logging) for references of expected log pattern.
205
+
See [AWS X-Ray Segment Documents](https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html) for more information on the AWS X-Ray data model. See [OpenTelemetry data model spec](https://github.com/open-telemetry/opentelemetry-specification) for more information on OpenTelemetry data model. See [X-Ray Logging Configuration](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-java-configuration.html#xray-sdk-java-configuration-logging) for references of expected log pattern. See [AWS X-Ray Tracing Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awsxrayexporter) for more information on the exporter's config.
197
206
198
207
### Enable The Customized X-Ray Annotations
199
208
By using OpenTelemetry SDK, we can add the customized attributes for each trace subsegment. By default, these OpenTelemetry
0 commit comments