Commit Graph

3 Commits

Author SHA1 Message Date
Pratik Mankawde
f3dc5c4e27 fix(test): compare the trace strategy against its enumerator
getConsensusTraceStrategy() returns ConsensusTraceStrategy, so comparing
it to a string literal does not compile.

No coverage is lost: strategyName()'s spelling has its own assertions in
the TelemetryConfig test, in this same binary.
2026-09-08 17:13:08 +01:00
Pratik Mankawde
ba5f3f65ca fix(test): qualify attr in the node-id resource test
Two names spelled attr are visible in a unity translation unit that holds both
this file and the consensus span-name test: xrpl::telemetry::attr, which this
file's using-directive brings in, and xrpl::telemetry::consensus::span::attr,
which the other file's does. Unqualified attr:: is then ambiguous and the
translation unit does not compile.

Name telemetry::attr explicitly. That is unique -- the consensus one is nested
deeper -- so the reference no longer depends on which files a unity batch
happens to group together. attr is the only colliding name; xrpl::telemetry
declares no part, op, event or val for the other side to shadow.
2026-08-27 14:12:28 +01:00
Pratik Mankawde
070d29b465 feat(telemetry): add the xrpl.node.id resource attribute
Node identity reached the OTel resource only as service.instance.id, which is
config-overridable and carries a deployment-chosen label rather than the node's
own identity. Add xrpl.node.id, set unconditionally from the node public key
(base58, TokenType::NodePublic), so traces and metrics share a stable per-node
key independent of [telemetry] service_instance_id.

Set on the tracer resource via Telemetry::setNodeId(), called from
ApplicationImp::setup() once nodeIdentity_ is known, and on the MetricsRegistry
resource via an added start() parameter. The beast::insight meter provider is
built in TelemetryImpl's constructor, before the wallet DB exists, so its
resource cannot carry the value; that path is left for later and the attribute
is omitted rather than stamped blank.

Also drops the transform/spanidentity collector processor added in
4a361a496d: per-node identity belongs on the resource, not copied onto every
span.
2026-08-19 19:50:40 +01:00