cardano-node: remove iohk-monitoring tracing backend#6580
Open
jutaro wants to merge 14 commits into
Open
Conversation
Contributor
Author
|
The change in [Byron.hs:122] is: Before: instance ToJSON (TxId (GenTx ByronBlock)) where ( "txid" .= (Text.take 8 . renderTxId $ txId tx) ) |
mgmeier
requested changes
May 26, 2026
Addresses all review comments from PR #6580 (mgmeier). The root cause of most issues was that `Cardano.Tracing.HasIssuer` was incorrectly deleted as part of the iohk-monitoring cleanup
mgmeier
requested changes
May 27, 2026
Replace locally-defined orphan `ToJSON`/`FromJSON` instances that already exist in `Cardano.Network.OrphanInstances` (from the `cardano-diffusion:orphan-instances` sublibrary) with imports of that module: - `TopologyP2P`: remove `FromJSON/ToJSON PeerTrustable`, `FromJSON/ToJSON (NetworkTopology UseBootstrapPeers PeerTrustable)`, and `FromJSON UseBootstrapPeers`; add `Cardano.Network.OrphanInstances ()` and `Ouroboros.Network.OrphanInstances ()` imports. - `StateRep`: remove local `ToJSON/FromJSON NodeToNodeVersion`, `ToJSON/FromJSON NodeToClientVersion`, and `parseBoundedEnum`; add `Cardano.Network.OrphanInstances ()` import. - `Tracers`: remove Show-based `ToJSON NodeToNodeVersionData` and `ToJSON NodeToClientVersionData` stubs; add `Cardano.Network.OrphanInstances ()` import. Additionally fix two pre-existing issues in `Consensus.hs`: - `deltaq`: use `toJSON gsv` (structured JSON via `Ouroboros.Network.OrphanInstances`) instead of `String . show`. - `TraceDecisionEvent`: restore the `dtal >= DMaximum` conditional branch (replacing the reversed fold), using `forMachine DMaximum` for the verbose case. In `Startup.hs`, fix `ConsensusNetworkVersionTuple` to emit proper structured JSON for `nodeToClientVersion`/`nodeToNodeVersion` via `ToJSON` from `Cardano.Network.OrphanInstances`, and fix the `maxNodeToNode/ClientVersion` field to show only the version key rather than the full `(key, value)` pair.
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.
Summary
Removes the legacy
iohk-monitoring-based tracing infrastructure fromcardano-node, leavingtrace-dispatcheras the sole tracing backend.trace-dispatcherhas been the production default since node 8.x. The oldiohk-monitoringpath was retained during a transition period but is no longerused or tested in production deployments. Removing it eliminates ~11 000 lines
of dead code and 9 transitive build dependencies.
What changed
Deleted (~8 100 lines, 15 modules):
Cardano.Tracing.*—Config,HasIssuer,Metrics,Render,Shutdown,Startup,Tracers, and allOrphanInstances.*modules(Byron, Common, Consensus, HardFork, Network, Shelley)
Cardano.Node.Configuration.Logging— the iohk-monitoring init layerCardano.Node.Tracing.Compat— compatibility shimModified:
Cardano.Node.Run— simplified to use onlyinitTraceDispatcher; alllegacy
createLoggingLayer/setupTrace/Cardano.BM.*imports goneCardano.Node.TraceConstraints— removesHasIssuer,ToObject, andrelated iohk-monitoring constraints
cardano-node.cabal— dropsiohk-monitoring,lobemo-backend-*,lobemo-scribe-systemd,ekg-wai,tracer-transformers,scientific"tracing_backend"updated to"trace-dispatcher"Breaking change
Any node config still using
"TracingBackend": "iohk-monitoring"or legacyLoggingconfig keys will need to be migrated totrace-dispatcherconfiguration before upgrading. Refer to the trace-dispatcher migration guide.
Config options removed with iohk-monitoring
The following node configuration keys have no effect after the removal of the
iohk-monitoringtracing backend. All tracing is now handled exclusively bytrace-dispatcher.Parsed by the node but silently ignored
These three keys are still accepted by the JSON parser to avoid hard failures
on existing configs, but have no effect:
TurnOnLoggingTurnOnLogMetricsUseTraceDispatcherfalse) and trace-dispatcher (true) backendParsed by
Cardano.Tracing.Config(module deleted)TracingVerbosityMinimalVerbosity/NormalVerbosity/MaximalVerbosityTraceAcceptPolicyTraceBackingStoreTraceBlockFetchClientTraceBlockFetchDecisionsTraceBlockFetchProtocolTraceBlockFetchProtocolSerialisedTraceBlockFetchServerTraceBlockchainTimeTraceChainDB/TraceChainDbTraceChainSyncClientTraceChainSyncBlockServerTraceChainSyncHeaderServerTraceChainSyncProtocolTraceChurnModeTraceConnectionManagerTraceConnectionManagerCountersTraceConnectionManagerTransitionsTraceCsjTraceDevotedBlockFetchTraceDiffusionInitializationTraceDNS/TraceDnsResolver/TraceDnsSubscriptionTraceErrorPolicy/TraceLocalErrorPolicyTraceForge/TraceForgeStateInfoTraceGDDTraceGsmTraceHandshake/TraceLocalHandshakeTraceInboundGovernorTraceInboundGovernorCountersTraceInboundGovernorTransitionsTraceIpSubscriptionTraceKeepAliveClient/TraceKeepAliveProtocolTraceKesAgentTraceLedgerPeersTraceLocalChainSyncProtocolTraceLocalConnectionManagerTraceLocalMux/TraceLocalMuxBearer/TraceLocalMuxChannelTraceLocalRootPeersTraceLocalServerTraceLocalStateQueryProtocolTraceLocalTxMonitorProtocolTraceLocalTxSubmissionProtocol/TraceLocalTxSubmissionServerTraceMempoolTraceMux/TraceMuxBearer/TraceMuxChannelTracePeerSelection/TracePeerSelectionActions/TracePeerSelectionCountersTracePeerSharingProtocolTracePublicRootPeersTraceSanityCheckIssueTraceServerTraceTxCountersTraceTxInbound/TraceTxOutboundTraceTxLogicTraceTxSubmissionProtocol/TraceTxSubmission2ProtocolRead directly by the
iohk-monitoringlibraryThese keys were consumed by
Cardano.BM.Configuration— the node never parsedthem itself. They are now entirely ignored:
minSeverityDebug/Info/Notice/Warning/Error/Critical)rotationrpLogLimitBytes,rpKeepFilesNum,rpMaxAgeHours)setupBackendsKatipBK,EKGViewBK, etc.)defaultBackendssetupScribesdefaultScribeshasEKGhasPrometheusoptions.mapBackendsoptions.mapSubtraceoptions.mapSeverityReplacements in trace-dispatcher
The
trace-dispatcherbackend has its own equivalents for severity filteringand output routing, configured under
TraceOptionsin the trace-dispatcherconfig file. Refer to the trace-dispatcher documentation for the current config
format.