Skip to content

Commit

Permalink
Update tracing README sample (#10386)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakshith91 authored Mar 19, 2020
1 parent 3488ccc commit 4ed6294
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sdk/core/azure-core-tracing-opentelemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ from azure.core.tracing.ext.opentelemetry_span import OpenTelemetrySpan
settings.tracing_implementation = OpenTelemetrySpan

# Example of Azure Monitor exporter, but you can use anything OpenTelemetry supports
from opentelemetry.ext.azure_monitor import AzureMonitorSpanExporter
from azure_monitor import AzureMonitorSpanExporter
exporter = AzureMonitorSpanExporter(
instrumentation_key="uuid of the instrumentation key (see your Azure Monitor account)"
)
Expand All @@ -54,9 +54,9 @@ from opentelemetry.sdk.trace.export import SimpleExportSpanProcessor
# Simple console exporter
exporter = ConsoleSpanExporter()

trace.set_preferred_tracer_implementation(lambda T: TracerSource())
trace.set_preferred_tracer_source_implementation(lambda T: TracerSource())
tracer = trace.get_tracer(__name__)
tracer.tracer_source().add_span_processor(
trace.tracer_source().add_span_processor(
SimpleExportSpanProcessor(exporter)
)

Expand All @@ -69,7 +69,7 @@ with tracer.start_as_current_span(name="MyApplication"):
client.create_container('mycontainer') # Call will be traced
```

Azure Exporter can be found in the package `opentelemetry-azure-monitor-exporter`
Azure Exporter can be found in the [package](https://github.com/microsoft/opentelemetry-exporters-python) `opentelemetry-azure-monitor-exporter`


## Troubleshooting
Expand Down

0 comments on commit 4ed6294

Please sign in to comment.