Skip to content

Commit 8fc499f

Browse files
authored
Fixes Django issue deprecation issue
The current `settings.py` configuration in `LOGGING` produces a deprecation warning and raises `ValueError: Unable to configure handler 'azure'` changing the `instrumentation_key` to `connection_string` ## Using - MacOS Ventura - 13.2 - Django 4.1.5 - Python 3.10.8 ## To Replicate The Issue Copy/Paste the code example in [Configure logging for Django applications](https://learn.microsoft.com/en-us/azure/azure-monitor/app/opencensus-python#configure-logging-for-django-applications) This `settings.py` change becomes more similar to [Tracking Django Applications](https://learn.microsoft.com/en-us/azure/azure-monitor/app/opencensus-python-request#tracking-django-applications).
1 parent e82b371 commit 8fc499f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ LOGGING = {
154154
"azure": {
155155
"level": "DEBUG",
156156
"class": "opencensus.ext.azure.log_exporter.AzureLogHandler",
157-
"instrumentation_key": "<your-ikey-here>",
157+
"connection_string": "<your-application-insights-connection-string>",
158158
},
159159
"console": {
160160
"level": "DEBUG",

0 commit comments

Comments
 (0)