Skip to content

Commit 32891d6

Browse files
authored
Fix examples for Azure Exporter
1 parent 39598b4 commit 32891d6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

articles/azure-monitor/app/opencensus-python-request.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ First, instrument your Python application with latest [OpenCensus Python SDK](..
3535
```python
3636
OPENCENSUS = {
3737
'TRACE': {
38-
'SAMPLER': 'opencensus.trace.samplers.ProbabilitySampler(rate=0.5)',
38+
'SAMPLER': 'opencensus.trace.samplers.ProbabilitySampler(rate=1)',
3939
'EXPORTER': '''opencensus.ext.azure.trace_exporter.AzureExporter(
40-
service_name='foobar',
40+
connection_string="InstrumentationKey=<your-ikey-here>"
4141
)''',
4242
}
4343
}
@@ -50,9 +50,9 @@ First, instrument your Python application with latest [OpenCensus Python SDK](..
5050
'TRACE': {
5151
'SAMPLER': 'opencensus.trace.samplers.ProbabilitySampler(rate=0.5)',
5252
'EXPORTER': '''opencensus.ext.azure.trace_exporter.AzureExporter(
53-
service_name='foobar',
53+
connection_string="InstrumentationKey=<your-ikey-here>",
5454
)''',
55-
'BLACKLIST_PATHS': 'https://example.com', <--- This site will not be traced if a request is sent from it.
55+
'BLACKLIST_PATHS': ['https://example.com'], <--- These sites will not be traced if a request is sent from it.
5656
}
5757
}
5858
```
@@ -91,9 +91,9 @@ First, instrument your Python application with latest [OpenCensus Python SDK](..
9191
'TRACE': {
9292
'SAMPLER': 'opencensus.trace.samplers.ProbabilitySampler(rate=1.0)',
9393
'EXPORTER': '''opencensus.ext.azure.trace_exporter.AzureExporter(
94-
service_name='foobar',
94+
connection_string="InstrumentationKey=<your-ikey-here>",
9595
)''',
96-
'BLACKLIST_PATHS': 'https://example.com', <--- This site will not be traced if a request is sent to it.
96+
'BLACKLIST_PATHS': ['https://example.com'], <--- These sites will not be traced if a request is sent to it.
9797
}
9898
}
9999
```
@@ -118,9 +118,9 @@ First, instrument your Python application with latest [OpenCensus Python SDK](..
118118
'TRACE': {
119119
'SAMPLER': 'opencensus.trace.samplers.ProbabilitySampler(rate=1.0)',
120120
'EXPORTER': '''opencensus.ext.azure.trace_exporter.AzureExporter(
121-
service_name='foobar',
121+
connection_string="InstrumentationKey=<your-ikey-here>",
122122
)''',
123-
'BLACKLIST_PATHS': 'https://example.com', <--- This site will not be traced if a request is sent to it.
123+
'BLACKLIST_PATHS': ['https://example.com'], <--- These sites will not be traced if a request is sent to it.
124124
}
125125
}
126126
}

0 commit comments

Comments
 (0)