Skip to content

Releases: snok/asgi-correlation-id

3.2.1

18 Nov 07:44
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.2.0...v3.2.1

v3.2.0

14 Oct 17:51
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.1.0...v3.2.0

v3.1.0

29 Sep 04:24
Compare
Choose a tag to compare

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

27 Jul 08:54
8aa4078
Compare
Choose a tag to compare

Adds starlette to the package's dependencies (#44)

v3.0.0

18 May 07:21
a47917d
Compare
Choose a tag to compare

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

16 May 07:47
d4d06da
Compare
Choose a tag to compare
v3.0.0a1 Pre-release
Pre-release

Test candidate for v3

v2.0.0

30 Apr 12:03
0c6fd1e
Compare
Choose a tag to compare

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.

v1.1.4

22 Mar 11:17
791ea1c
Compare
Choose a tag to compare

Fixes

  • Hotfix header issue introduced in v1.1.3 (#30)

v1.1.3

21 Mar 09:16
Compare
Choose a tag to compare

Fixes

Fix bug where headers would get overwritten by the middleware (#25). Thanks @lakshaythareja and @uncovor ๐Ÿ‘

v1.1.2

30 Nov 23:46
Compare
Choose a tag to compare

Fix log filter max uuid-length issue cropping incoming valid UUIDs to 32/36 chars (#14). Thanks @matusvalo ๐Ÿ‘