Skip to content

Commit

Permalink
Import missing components for docs (open-telemetry#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanielRN authored and Azfaar Qureshi committed Nov 27, 2020
1 parent 252be56 commit b0bfac9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

## Unreleased

- Import missing components for docs
([#198](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/198))
- Provide components needed to Configure OTel SDK for Tracing with AWS X-Ray
([#130](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/130))
25 changes: 23 additions & 2 deletions sdk-extension/opentelemetry-sdk-extension-aws/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,19 @@ Usage (AWS X-Ray IDs Generator)
Configure the OTel SDK TracerProvider with the provided custom IDs Generator to
make spans compatible with the AWS X-Ray backend tracing service.

Install the OpenTelemetry SDK package.

::

pip install opentelemetry-sdk-extension-aws

Next, use the provided `AwsXRayIdsGenerator` to initialize the `TracerProvider`.

.. code-block:: python
import opentelemetry.trace as trace
from opentelemetry.sdk.extension.aws.trace import AwsXRayIdsGenerator
from opentelemetry.sdk.trace import TracerProvider
trace.set_tracer_provider(
TracerProvider(ids_generator=AwsXRayIdsGenerator())
Expand All @@ -36,14 +46,25 @@ make spans compatible with the AWS X-Ray backend tracing service.
Usage (AWS X-Ray Propagator)
----------------------------

Set this environment variable to have the OTel SDK use the provided AWS X-Ray
Propagator:
Use the provided AWS X-Ray Propagator to inject the necessary context into
traces sent to external systems.

This can be done by either setting this environment variable:

::

export OTEL_PROPAGATORS = aws_xray


Or by setting this propagator in your instrumented application:

.. code-block:: python
from opentelemetry import propagators
from opentelemetry.sdk.extension.aws.trace.propagation.aws_xray_format import AwsXRayFormat
propagators.set_global_textmap(AwsXRayFormat())
References
----------

Expand Down

0 comments on commit b0bfac9

Please sign in to comment.