You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/opentelemetry-enable.md
+3-15Lines changed: 3 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,21 +219,9 @@ from azure.monitor.opentelemetry import configure_azure_monitor
219
219
# Import the tracing api from the `opentelemetry` package.
220
220
from opentelemetry import trace
221
221
222
-
# Configure OpenTelemetry to use Azure Monitor with the specified connection
223
-
# string.
224
-
configure_azure_monitor(
225
-
connection_string="<Your Connection String>",
226
-
)
227
-
228
-
# Get a tracer for the current module.
229
-
tracer = trace.get_tracer(__name__)
230
-
231
-
# Start a new span with the name "hello". This also sets this created span as the current span in this context. This span will be exported to Azure Monitor as part of the trace.
232
-
with tracer.start_as_current_span("hello"):
233
-
print("Hello, World!")
234
-
235
-
# Wait for export to take place in the background.
236
-
input()
222
+
# Configure OpenTelemetry to use Azure Monitor with the
0 commit comments