Skip to content

Commit 31379c8

Browse files
committed
Add readme file
1 parent f0449ec commit 31379c8

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

sdk-extension/opentelemetry-sdk-extension-aws/README.md

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
OpenTelemetry SDK Extension for AWS X-Ray Compatibility
2+
=======================================================
3+
4+
TODO: Deploy this package to Pypi
5+
6+
7+
This library provides components necessary to configure the OpenTelemetry SDK
8+
for tracing with AWS X-Ray.
9+
10+
Installation
11+
------------
12+
13+
::
14+
15+
pip install opentelemetry-sdk-extension-aws
16+
17+
18+
Usage (Simple Console Export)
19+
-----------------------------
20+
21+
Set this environment variable to use the provided AWS X-Ray Propagator:
22+
23+
::
24+
25+
export OTEL_PYTHON_PROPAGATORS = aws_xray
26+
27+
Then, begin tracing like so:
28+
29+
.. code-block:: python
30+
31+
from opentelemetry.sdk.extension.aws.trace import AWSXRayIdsGenerator
32+
33+
span_processor = SimpleExportSpanProcessor(ConsoleSpanExporter())
34+
trace.set_tracer_provider(
35+
TracerProvider(
36+
active_span_processor=span_processor,
37+
ids_generator=AWSXRayIdsGenerator(),
38+
)
39+
)
40+
tracer = trace.get_tracer(__name__)
41+
42+
if __name__ == "__main__":
43+
with tracer.start_as_current_span('my_first_span', kind=SpanKind.SERVER):
44+
print('Success!')
45+
46+
47+
References
48+
----------
49+
50+
* `OpenTelemetry Project <https://opentelemetry.io/>`_

0 commit comments

Comments
 (0)