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
{{ message }}
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
* Create an Azure Monitor resource and get the instrumentation key, more information can be found in the official `docs <https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource>`_.
20
+
* Place your instrumentation key in a `connection string` and directly into your code.
21
+
* Alternatively, you can specify your `connection string` in an environment variable ``APPLICATIONINSIGHTS_CONNECTION_STRING``.
22
+
16
23
Usage
17
24
-----
18
25
@@ -23,10 +30,6 @@ The **Azure Monitor Log Handler** allows you to export Python logs to `Azure Mon
23
30
24
31
This example shows how to send a warning level log to Azure Monitor.
25
32
26
-
* Create an Azure Monitor resource and get the instrumentation key, more information can be found `here <https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource>`_.
27
-
* Place your instrumentation key in a `connection string` and directly into your code.
28
-
* Alternatively, you can specify your `connection string` in an environment variable ``APPLICATIONINSIGHTS_CONNECTION_STRING``.
29
-
30
33
.. code:: python
31
34
32
35
import logging
@@ -42,10 +45,7 @@ Correlation
42
45
43
46
You can enrich the logs with trace IDs and span IDs by using the `logging integration <../opencensus-ext-logging>`_.
44
47
45
-
* Create an Azure Monitor resource and get the instrumentation key, more information can be found `here <https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource>`_.
46
48
* Install the `logging integration package <../opencensus-ext-logging>`_ using ``pip install opencensus-ext-logging``.
47
-
* Place your instrumentation key in a `connection string` and directly into your code.
48
-
* Alternatively, you can specify your `connection string` in an environment variable ``APPLICATIONINSIGHTS_CONNECTION_STRING``.
49
49
50
50
.. code:: python
51
51
@@ -142,10 +142,6 @@ Metrics
142
142
143
143
The **Azure Monitor Metrics Exporter** allows you to export metrics to `Azure Monitor`_.
144
144
145
-
* Create an Azure Monitor resource and get the instrumentation key, more information can be found `here <https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource>`_.
146
-
* Place your instrumentation key in a `connection string` and directly into your code.
147
-
* Alternatively, you can specify your `connection string` in an environment variable ``APPLICATIONINSIGHTS_CONNECTION_STRING``.
148
-
149
145
.. code:: python
150
146
151
147
import time
@@ -297,10 +293,6 @@ The **Azure Monitor Trace Exporter** allows you to export `OpenCensus`_ traces t
297
293
298
294
This example shows how to send a span "hello" to Azure Monitor.
299
295
300
-
* Create an Azure Monitor resource and get the instrumentation key, more information can be found `here <https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource>`_.
301
-
* Place your instrumentation key in a `connection string` and directly into your code.
302
-
* Alternatively, you can specify your `connection string` in an environment variable ``APPLICATIONINSIGHTS_CONNECTION_STRING``.
303
-
304
296
.. code:: python
305
297
306
298
from opencensus.ext.azure.trace_exporter import AzureExporter
@@ -324,10 +316,7 @@ OpenCensus also supports several `integrations <https://github.com/census-instru
324
316
325
317
This example shows how to integrate with the `requests <https://2.python-requests.org/en/master/>`_ library.
326
318
327
-
* Create an Azure Monitor resource and get the instrumentation key, more information can be found `here <https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource>`_.
328
319
* Install the `requests integration package <../opencensus-ext-requests>`_ using ``pip install opencensus-ext-requests``.
329
-
* Place your instrumentation key in a `connection string` and directly into your code.
330
-
* Alternatively, you can specify your `connection string` in an environment variable ``APPLICATIONINSIGHTS_CONNECTION_STRING``.
331
320
332
321
.. code:: python
333
322
@@ -384,7 +373,7 @@ Modifying Traces
384
373
Integrate with Azure Functions
385
374
##############################
386
375
387
-
Users who want to capture custom telemetry in Azure Functions environments are encouraged to used the OpenCensus Python Azure Functions `extension <https://github.com/census-ecosystem/opencensus-python-extensions-azure/tree/main/extensions/functions#opencensus-python-azure-functions-extension>`_. More details can be found `here<https://docs.microsoft.com/azure/azure-functions/functions-reference-python?tabs=application-level#log-custom-telemetry>`_.
376
+
Users who want to capture custom telemetry in Azure Functions environments are encouraged to used the OpenCensus Python Azure Functions `extension <https://github.com/census-ecosystem/opencensus-python-extensions-azure/tree/main/extensions/functions#opencensus-python-azure-functions-extension>`_. More details can be found in this `document<https://docs.microsoft.com/azure/azure-functions/functions-reference-python?tabs=application-level#log-custom-telemetry>`_.
0 commit comments