Asgi-correlation-id

Latest version: v4.3.4

Safety actively analyzes 688587 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

3.1.0

What's Changed
* docs: Add docs for how to integrate with [saq](https://github.com/tobymao/saq) by sondrelg in https://github.com/snok/asgi-correlation-id/pull/47
* chore: Update workflows by sondrelg in https://github.com/snok/asgi-correlation-id/pull/48
* chore: Upgrade to Poetry 1.2.0 by sondrelg in https://github.com/snok/asgi-correlation-id/pull/49
* feat: Add ability to specify celery-integration generated IDs and fix celery log filter signature inconsistency dapryor in https://github.com/snok/asgi-correlation-id/pull/51

New Contributors
* dapryor made their first contribution in https://github.com/snok/asgi-correlation-id/pull/51

**Full Changelog**: https://github.com/snok/asgi-correlation-id/compare/v3.0.1...v3.1.0

3.0.1

Adds [starlette](starlette.io) to the package's dependencies (44)

3.0.0

Changes
Breaking changes

- Reworked the middleware settings (39)

- Reworded a warning logger (https://github.com/snok/asgi-correlation-id/commit/1883b31b0b115b2e6706c03f9bf94fadfeebca7a). 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:

diff
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](https://github.com/snok/asgi-correlation-id#middleware-configuration).

3.0.0a1

Test candidate for v3

2.0.0

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.

1.1.4

**Fixes**

- Hotfix header issue introduced in v1.1.3 (30)

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.