Changes
**Breaking changes**
- Drops Python 3.6
- Old log filter factories were removed. All users will need to follow the migration guide below to upgrade.
**Non-breaking changes**
- Adds 3.11 support
Migration guide
The `celery_tracing_id_filter` and `correlation_id_filter` callables have been removed in the latest release.
To upgrade, change from this log filter implementation:
python
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'correlation_id': {'()': correlation_id_filter(uuid_length=32)},
'celery_tracing': {'()': celery_tracing_id_filter(uuid_length=32)},
},
...
}
To this one:
python
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'correlation_id': {
'()': 'asgi_correlation_id.CorrelationIdFilter',
'uuid_length': 32,
},
'celery_tracing': {
'()': 'asgi_correlation_id.CeleryTracingIdsFilter',
'uuid_length': 32,
},
},
...
}
When upgrading a project which only implemented `correlation_id_filter`, you should expect this diff:
diff
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
- 'correlation_id': {'()': correlation_id_filter(uuid_length=32)},
+ 'correlation_id': {
+ '()': 'asgi_correlation_id.CorrelationIdFilter',
+ 'uuid_length': 32,
+ },
},
...
}
See the [repository README](https://github.com/snok/asgi-correlation-id) for updated documentation.