mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-25 08:00:22 +00:00
Merge branch 'pratik/otel-phase6-statsd' into pratik/otel-phase7-native-metrics
# Conflicts: # src/test/csf/Peer.h
This commit is contained in:
@@ -170,6 +170,10 @@
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
namespace protocol {
|
||||
class TraceContext;
|
||||
} // namespace protocol
|
||||
|
||||
namespace xrpl::telemetry {
|
||||
|
||||
/**
|
||||
@@ -436,6 +440,20 @@ public:
|
||||
[[nodiscard]] TraceBytes
|
||||
getTraceBytes() const;
|
||||
|
||||
/**
|
||||
* Inject the calling thread's currently-active OTel context into a
|
||||
* protobuf TraceContext message for cross-node propagation.
|
||||
*
|
||||
* Encapsulates `RuntimeContext::GetCurrent()` + `injectToProtobuf`
|
||||
* so callers in app-layer code (e.g. RCLConsensus broadcasting
|
||||
* TMProposeSet / TMValidation) don't depend on any OTel headers.
|
||||
* No-op if telemetry is disabled or no span is active.
|
||||
*
|
||||
* @param proto The protobuf TraceContext to populate.
|
||||
*/
|
||||
static void
|
||||
injectCurrentContextToProtobuf(protocol::TraceContext& proto);
|
||||
|
||||
// --- Attribute setters (explicit overloads, no OTel types) ---------
|
||||
|
||||
/**
|
||||
@@ -613,6 +631,11 @@ public:
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
static void
|
||||
injectCurrentContextToProtobuf(protocol::TraceContext&)
|
||||
{
|
||||
}
|
||||
// NOLINTEND(readability-convert-member-functions-to-static)
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user