Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import missing components for docs #198

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Import missing components for docs
NathanielRN committed Nov 20, 2020
commit c092856ca057dd2f587258a858b380312653cf68
2 changes: 2 additions & 0 deletions sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
@@ -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())
@@ -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
----------