Metadata-Version: 2.5
Name: narrativetrace-structlog
Version: 0.1.2
Summary: structlog processor injecting narrativetrace correlation keys
Project-URL: Homepage, https://github.com/narrativetrace/narrativetrace-python
Project-URL: Source, https://github.com/narrativetrace/narrativetrace-python
Author: narrativetrace contributors
License-Expression: BUSL-1.1
License-File: LICENSE
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: narrativetrace
Requires-Dist: structlog>=24
Description-Content-Type: text/markdown

# narrativetrace-structlog

A [structlog](https://www.structlog.org) processor that injects [narrativetrace](../narrativetrace)
correlation keys (`traceId`, `traceName`, `spanId`, `nt.class`, HTTP/request keys, …) into every
event dict — the same canonical key set the stdlib `NarrativeContextFilter` stamps onto log
records, so both logging front-ends stay in lockstep.

```python
import structlog
from narrativetrace_structlog import narrative_context_processor

structlog.configure(processors=[narrative_context_processor, structlog.processors.JSONRenderer()])
```
