Repository navigation
Conversation
The shipped `dmq-node/config.json` and the examples in `README.md` spell the tracing options with the legacy key names `TraceOptions` and `TraceOptionMetricsPrefix`. The tracing configuration parser accepts three shapes, tried in order: the legacy one, a `HermodTracing`/`TraceDispatcher` wrapper object, and the keys flattened at the top level -- and the flattened form spells them `Options` and `MetricsPrefix`. Both spellings therefore work today, but only the current one survives the removal of the legacy parser. Moving the shipped configuration and the documentation over now keeps that later change from stranding anyone who copied their configuration from this repository. No behaviour changes: existing configuration files, in either spelling, keep being accepted exactly as before.
The bound has been `^>=4.1` since c9312a6, which means `>=4.1 && <4.2` and so excludes ouroboros-consensus 4.2. CHaP already carries this same widening as revision 2 of dmq-node 0.7.0.0, but it was never merged back into the source tree, so 0.7.1.0 still declares `^>=4.1`. Widening the bound on its own is not enough: ouroboros-consensus 4.2.0.0 was published to CHaP on 2026-08-27, after the pinned index-state of 2026-08-11T14:53:43Z, so at that index-state there is no 4.2 to resolve to. The index-state moves to 2026-09-16T14:05:36Z, and `flake.lock` follows via `nix flake update CHaP`, the same pairing as in c9312a6. `cabal build all --dry-run` resolves, and the solver delta is confined to ouroboros-consensus and its own closure: cardano-ledger-shelley 1.19.0.0 -> 1.19.0.1 cardano-slotting 0.2.1.0 -> 0.2.2.0 ouroboros-consensus 4.1.0.0 -> 4.2.1.0 plutus-core 1.67.0.0 -> 1.69.0.0 plutus-ledger-api 1.67.0.0 -> 1.69.0.0 plutus-tx 1.67.0.0 -> 1.69.0.0 sop-extras -> 0.4.2.0 (new) Note this invalidates the `dist-newstyle` CI cache, which is keyed on the hash of `cabal.project`.
`trace-dispatcher` has been renamed and split into `hermod-tracing-api`,
`hermod-tracing-core` and `hermod-tracing-prometheus`; the module namespace
`Cardano.Logging` became `Hermod.Tracing`.
dmq-node is an application, so it keeps hermod-tracing for its own structured
traces and adapts at the boundary with ouroboros-network and
ouroboros-consensus, whose public libraries carry contra-tracer. Both tracer
records in DMQ.Tracer are `mkTracer $ Logging.traceWith <tracer>` -- the 25
fields of Diffusion.Tracers and the 23 of DMQTracers -- with the traces
themselves built by mkLoggingTracer on hermod.
One field is not contra-tracer. `dmqStartupTracer` is dmq's own message type,
consumed only in Main and handed to hermod-tracing-prometheus, which since 1.1
takes a hermod `Trace`. It stays `Logging.Trace m DMQStartupTrace`, so the
toContraTracer bridge in front of runPrometheusSimple goes and Main qualifies
its six traceWith calls accordingly. No ouroboros-network type is involved, so
nothing requires it to be contra-tracer.
Mechanically:
* `Cardano.Logging` -> `Hermod.Tracing` (`hermod-tracing-core`), and
`Cardano.Logging.Prometheus.TCPServer` ->
`Hermod.Tracing.Prometheus.TCPServer`, which is now its own package;
* `mkCardanoTracer` -> `mkHermodTracer`;
* `trace-dispatcher` -> `hermod-tracing-core` + `hermod-tracing-prometheus`
in the library, and both in the executable, which needs core for the
startup trace; contra-tracer in the library, the executable and the test
suite. `dmq-cddl` needs no tracing dependency at all.
`hermod-tracing-api` is not a dependency of any stanza: no module imports
`Hermod.Tracing.API`, and -Werror=unused-packages rejects it.
Then `scripts/ci/run-stylish-haskell.sh` and `scripts/ci/run-cabal-gild.sh`.
Configuration is read as before. hermod-tracing-core 1.0.1 reads
trace-dispatcher's layout with the precedence trace-dispatcher 2.13 had, and
still falls back to TRACE_DISPATCHER_LOGGING_HOSTNAME, so an existing
configuration file keeps working. The changelog entries say so under
Non-Breaking, and name the two keys that matter to dmq-node, the silent case
of mixing old and new names in one file, and what to keep for a rollback to
0.7. dmq-node requires hermod-tracing-core ^>=1.0.1, the first release with
those fallbacks, and hermod-tracing-prometheus ^>=1.1.
…builds Lets CI build this branch before CHaP has hermod-tracing-core 1.0.1 and hermod-tracing-prometheus 1.1.0, which are IntersectMBO/hermod-tracing#21. hermod-tracing-api is listed only because hermod-tracing-prometheus depends on its internal sublibrary; no module here imports it. ouroboros-network is pinned for a different reason: its tracing sublibraries provide their LogFormatting instances against hermod-tracing-api rather than trace-dispatcher, and no version bound can express that, because the flipped packages keep their released version numbers. Without it DMQ.Tracer does not compile -- 40 errors of the shape "Could not deduce LogFormatting (Mx.WithBearer (ConnectionId RemoteAddress) Mx.Trace)". The pin is IntersectMBO/ouroboros-network#5447. ouroboros-consensus needs no pin; it resolves from CHaP. Both stanzas must be removed before this merges.
There was a problem hiding this comment.
🟡 Changes recommended
Temporary source pins remain despite the pre-merge requirement, and the main migration changelog misstates the tracer boundary.
2 open findings
What changed in this PR
Migrates dmq-node logging from trace-dispatcher to hermod-tracing while preserving contra-tracer boundaries.
Changes:
- Replaces tracing dependencies, namespaces, configuration keys, and Prometheus integration.
- Updates consensus/CHaP dependencies and documentation.
- Adds temporary upstream source pins.
| File | Description |
|---|---|
README.md |
Updates tracing names and configuration keys. |
flake.lock |
Updates the CHaP revision. |
dmq-node/test/DMQ/Protocol/LocalMsgNotification/Test.hs |
Reorders tracer import. |
dmq-node/test/DMQ/Protocol/LocalMsgNotification/Examples.hs |
Reorders tracer import. |
dmq-node/src/DMQ/Tracer.hs |
Builds Hermod traces and adapts boundary tracers. |
dmq-node/src/DMQ/SigSubmissionV2/Outbound.hs |
Reorders package-import pragma. |
dmq-node/src/DMQ/SigSubmissionV2/Inbound.hs |
Reorders package-import pragma. |
dmq-node/src/DMQ/Protocol/SigSubmission/Type.hs |
Migrates logging namespace. |
dmq-node/src/DMQ/NodeToNode.hs |
Reorders package-import pragma. |
dmq-node/src/DMQ/NodeToClient/LocalStateQueryClient/Types.hs |
Migrates logging namespace. |
dmq-node/src/DMQ/NodeToClient/LocalStateQueryClient.hs |
Reorders package-qualified tracer import. |
dmq-node/src/DMQ/NodeToClient/LocalMsgSubmission.hs |
Migrates logging namespace and imports. |
dmq-node/src/DMQ/NodeToClient/LocalMsgNotification.hs |
Reorders tracer import. |
dmq-node/src/DMQ/NodeToClient.hs |
Reorders package-import pragma. |
dmq-node/src/DMQ/Diffusion/NodeKernel.hs |
Reorders package-import pragma. |
dmq-node/src/DMQ/Diffusion/Arguments.hs |
Reorders package-qualified tracer import. |
dmq-node/dmq-node.cabal |
Replaces tracing dependencies and bumps consensus. |
dmq-node/config.json |
Uses the current tracing configuration key. |
dmq-node/changelog.d/20261002_120000_juergen.nicklisch_prometheus_trace.md |
Documents direct Prometheus tracing. |
dmq-node/changelog.d/20260924_214805_juergen.nicklisch_hermod_tracing.md |
Documents the tracing migration. |
dmq-node/changelog.d/20260924_194229_juergen.nicklisch_bump_consensus_4_2.md |
Documents the consensus bump. |
dmq-node/changelog.d/20260924_194135_juergen.nicklisch_tracing_config_keys.md |
Documents configuration-key migration. |
dmq-node/app/Main.hs |
Uses Hermod for startup and Prometheus traces. |
cabal.project |
Advances CHaP and temporarily pins upstream sources. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| -- https://github.com/dmwit/ordered-containers/issues/33 | ||
| , ordered-containers:containers | ||
|
|
||
| -- TEMPORARY, for review only: remove before merging. |
Comment on lines
+3
to
+8
| - Replace `trace-dispatcher` with `hermod-tracing`, its successor, and | ||
| `contra-tracer` with the `hermod-tracing-api` facade. The tracers `dmq-node` | ||
| builds are now `hermod-tracing` traces end to end, so they keep the control | ||
| channel that lets an application configure, silence and document a tracer it | ||
| has already handed out; the 48 places that previously collapsed a configured | ||
| trace into a plain callback are gone. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Moves dmq-node from
trace-dispatcheronto hermod-tracing, which istrace-dispatcherrenamed and split intohermod-tracing-api(instancesonly),
hermod-tracing-coreandhermod-tracing-prometheus. The modulenamespace
Cardano.LoggingbecameHermod.Tracing.The shape of it
dmq-node is an application, so it keeps hermod-tracing for its own
structured traces and adapts at the boundary with
ouroboros-networkandouroboros-consensus, whose public libraries carry contra-tracer. Both tracerrecords in
DMQ.TraceraremkTracer $ Logging.traceWith <tracer>— the 25fields of
Diffusion.Tracersand the 23 ofDMQTracers— with the tracesthemselves built by
mkLoggingTraceron hermod.One field deliberately is not contra-tracer.
dmqStartupTraceris dmq'sown message type, consumed only in
Mainand handed tohermod-tracing-prometheus, which since 1.1 takes a hermodTrace. So itstays
Logging.Trace m DMQStartupTrace, thetoContraTracerbridge in frontof
runPrometheusSimplegoes, andMainqualifies its sixtraceWithcallsaccordingly. No ouroboros-network type is involved, so nothing requires it to
be contra-tracer.
hermod-tracing-apiis not a dependency of any stanza: no module importsHermod.Tracing.API, and-Werror=unused-packagesrejects it.Configuration is read as before
hermod-tracing-core1.0.1 readstrace-dispatcher's configuration layoutwith the precedence
trace-dispatcher2.13 had, and still falls back toTRACE_DISPATCHER_LOGGING_HOSTNAME, so an existing configuration file keepsworking. The changelog entries say so under Non-Breaking, and name the two
keys that matter here, the silent case of mixing old and new names in one
file, and what to keep for a rollback to 0.7.
The source-repository-package stanzas
cabal.projectcarries two temporary pins, both of which must be removedbefore this merges:
hermod-tracing-core1.0.1 andhermod-tracing-prometheus1.1.0 are not on CHaP yet. They arehermod-tracing-api 1.1.0, hermod-tracing-core 1.0.1, hermod-tracing-prometheus 1.1.0 hermod-tracing#21.
hermod-tracing-apiis listed only becauseprometheus depends on its internal sublibrary.
sublibraries provide their
LogFormattinginstances againsthermod-tracing-apirather thantrace-dispatcher, and no version bound canexpress that, because the flipped packages keep their released version
numbers. Without it
DMQ.Tracerdoes not compile — 40 errors of the shapeCould not deduce LogFormatting (Mx.WithBearer … Mx.Trace). It points atTracing sublibraries on hermod-tracing-api instead of trace-dispatcher ouroboros-network#5447.
ouroboros-consensusneeds no pin; it resolves from CHaP.Also in this branch, and worth knowing
This branch is 7 commits behind
mainand will need updating before it canmerge.