Skip to content

Commit f60deb3

Browse files
Merge pull request #225999 from kjaymiller/jm-removes-fstring-in-fastapi-opencensus-requests
Removes f-string-in FastAPI-OpenCensus-Request-Exporter
2 parents 96fbf75 + 4fbeb8c commit f60deb3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ First, instrument your Python application with latest [OpenCensus Python SDK](./
2828
)
2929
```
3030

31-
3. Make sure AzureExporter is properly configured in your `settings.py` under `OPENCENSUS`. For requests from urls that you don't wish to track, add them to `EXCLUDELIST_PATHS`.
31+
3. Make sure AzureExporter is configured properly in your `settings.py` under `OPENCENSUS`. For requests from urls that you don't wish to track, add them to `EXCLUDELIST_PATHS`.
32+
3233

3334
```python
3435
OPENCENSUS = {
@@ -149,8 +150,7 @@ OpenCensus doesn't have an extension for FastAPI. To write your own FastAPI midd
149150
HTTP_URL = COMMON_ATTRIBUTES['HTTP_URL']
150151
HTTP_STATUS_CODE = COMMON_ATTRIBUTES['HTTP_STATUS_CODE']
151152

152-
APPINSIGHTS_CONNECTION_STRING='<your-appinsights_connection-string-here>'
153-
exporter=AzureExporter(connection_string=f'{APPINSIGHTS_CONNECTION_STRING}')
153+
exporter=AzureExporter(connection_string='<your-appinsights-connection-string-here>')
154154
sampler=ProbabilitySampler(1.0)
155155

156156
# fastapi middleware for opencensus

0 commit comments

Comments
 (0)