Skip to content

v2.0.0

Choose a tag to compare

@sondrelg sondrelg released this 30 Apr 12:03
· 129 commits to main since this release
0c6fd1e

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.