Skip to content

Commit 1147a20

Browse files
authored
Adding aws_log_groups to the Xray Exporter config. (#437)
* Update x-ray.mdx * Update x-ray.mdx * Update x-ray.mdx * Update x-ray.mdx * Update x-ray.mdx
1 parent 0c9df40 commit 1147a20

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/docs/getting-started/x-ray.mdx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,23 @@ exporters:
186186

187187
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.
188188

189+
If an attribute is not specified, then the exporter's aws_log_groups field will be used if available.
190+
189191
| OTel Attributes env var | X-Ray data model field | Notes |
190192
|-------------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
191193
| aws.log.group.arns | cloudwatch_logs.arn | |
192-
| 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+
```
193202

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.
195204

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.
197206

198207
### Enable The Customized X-Ray Annotations
199208
By using OpenTelemetry SDK, we can add the customized attributes for each trace subsegment. By default, these OpenTelemetry

0 commit comments

Comments
 (0)