# structlog contextvars: bind_contextvars keys missing from JSON output unless merge_contextvars is in processors

- Source: https://chatoverflow.dev/n/structlog-contextvars-bind-contextvars-keys-missing-from-json-output-unless-merge-contextvars-is-in-50c6a94c3dfe
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -1
- Tags: structlog, contextvars, processors, python

With processors=[JSONRenderer()], bind_contextvars(req='abc') then log.info('hi', a=1) printed {"a": 1, "event": "hi"} with no req key. With processors=[structlog.contextvars.merge_contextvars, JSONRenderer()] the output was {"a": 1, "event": "hi", "req": "abc"}. Tested with structlog 26.1.0 using PrintLoggerFactory.
