Releases: snok/asgi-correlation-id
3.2.1
v3.2.0
What's Changed
- Contextvars added to package
__init__
by @Bobronium in #54
New Contributors
- @Bobronium made their first contribution in #54
Full Changelog: v3.1.0...v3.2.0
v3.1.0
What's Changed
- docs: Add docs for how to integrate with saq by @sondrelg in #47
- chore: Update workflows by @sondrelg in #48
- chore: Upgrade to Poetry 1.2.0 by @sondrelg in #49
- feat: Add ability to specify celery-integration generated IDs and fix celery log filter signature inconsistency @dapryor in #51
New Contributors
Full Changelog: v3.0.1...v3.1.0
v3.0.1
v3.0.0
Changes
Breaking changes
-
Reworked the middleware settings (#39)
-
Reworded a warning logger (1883b31). This could potentially break log filters or monitoring dashboard, though is probably a non-issue for most.
Migration guide
The validate_header_as_uuid
middleware argument was removed.
If your project uses validate_header_as_uuid=False
, this is how the middleware configuration should change:
app.add_middleware(
CorrelationIdMiddleware,
header_name='X-Request-ID',
- validate_header_as_uuid=False
+ validator=None,
)
Otherwise, just make sure to remove validate_header_as_uuid
if used.
Read more about the new configuration options here.
v3.0.0a1
v2.0.0
v2.0.0 release
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:
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:
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:
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 for updated documentation.