We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b13ee7 commit c085d9fCopy full SHA for c085d9f
exporters/aws-otel-otlp-udp-exporter/validation-app/app.py
@@ -41,6 +41,11 @@ def udp_server():
41
# Create a span for testing with various attributes
42
tracer = trace.get_tracer(__name__)
43
with tracer.start_as_current_span("test_parent_span") as parent:
44
+ span_context = parent.get_span_context()
45
+ trace_id = span_context.trace_id
46
+ xray_trace_id = f"1-{format(trace_id, '032x')[0:8]}-{format(trace_id, '032x')[8:32]}"
47
+ print(f"X-Ray Trace ID: {xray_trace_id}")
48
+
49
parent.set_attribute("service.name", "validation-app")
50
parent.set_attribute("test.attribute", "test_value")
51
parent.add_event("test-event", {"event.data": "some data"})
0 commit comments