/aws-otel-go

AWS Distro for OpenTelemetry Go

Primary LanguageGoApache License 2.0Apache-2.0

AWS Distro for OpenTelemetry Go Language

Introduction

This repo hosts documentation and sample apps for the ADOT Go library which provides the AWS service integrations for traces and metrics for the OpenTelemetry Go library. The library can be configured to support trace applications with the AWS X-Ray service.

Please note all source code for the Go library is upstream on the OpenTelemetry project in the OpenTelemetry Go library repo. All features of the OpenTelemetry library are available along with its components beinbg configured to create traces which can be viewed in the AWS X-Ray console and to allow propagation of those contexts across multiple downstream AWS services.

Once traces have been generated, they can be sent to a tracing service, like AWS X-Ray, to visualize and understand exactly what happened during the traced calls. For more information about the AWS X-Ray service, see the AWS X-Ray Developer Guide.

To send traces to AWS X-Ray, you can use the AWS Distro for OpenTelemetry (ADOT) Collector. OpenTelemetry Go exports traces from the application to the ADOT Collector. The ADOT Collector is configured with AWS credentials for the CLI, an AWS region, and which trace attributes to index so that it can send the traces to the AWS X-Ray console. Read more about the AWS X-Ray Tracing Exporter for OpenTelemetry Collector.

ADOT is in preview for Go metrics.

Getting Started

Check out the getting started documentation

Sample Application (DEPRECATED)

WARNING: This sample app is deprecated and is no longer maintained. Please use the new standardized sample apps.

See the example sample application for setup steps.

The OpenTelemetry Go SDK provides entry points for configuration through its API. This is can be used to configure the id_generator needed to support the X-Ray trace ID format. In addition, it also allows the use of a custom propagator, passed into the tracer provider, to generate and propagate the AWS X-Ray trace header.

Useful Links

Security issue notifications

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our vulnerability reporting page. Please do not create a public github issue.

License

This project is licensed under the Apache-2.0 License.