Open arkataev opened 5 years ago
I have elaborated, that In order to trace request related db queries the manual call to django.db.connection.queries
within django middleware can be made. Result can be set as a current span attribute and send to Azure Monitor. That will work, but relating django.db.backends
log to request is still uncertain.
Python 2.7.13 django==1.11.20 opencensus == 0.7.1 opencensus-ext-django == 0.7.0 opencensus-ext-azure == 0.7.0 opencensus-ext-logging == 0.1.0
Seems like at least some django system-loggers (like,
django.db.backends
) are logged AFTER span, opened in Middleware, was closed. That means nooperation_id
is set in trace record produced by django logger.is there any way to produce django system-log traces related to http-request?
p.s
config_integration.trace_integrations(['logging'])
is set insidesettings.py
in django-project before any loggers are created.