mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +00:00
Merge branch 'pratik/otel-phase10-workload-validation' into pratik/otel-sync-diagnostics
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
},
|
||||
"title": "Log-Derived Insights",
|
||||
"uid": "log-derived-insights",
|
||||
"refresh": "30s",
|
||||
"refresh": "60s",
|
||||
"annotations": {
|
||||
"list": []
|
||||
},
|
||||
|
||||
@@ -86,7 +86,10 @@
|
||||
|
||||
namespace metric_sdk = opentelemetry::sdk::metrics;
|
||||
namespace otlp_http = opentelemetry::exporter::otlp;
|
||||
namespace resource = opentelemetry::sdk::resource;
|
||||
// Not `resource`: that would collide with xrpl::resource (the resource-accounting
|
||||
// namespace), which encloses every use site below. Inner-scope lookup would find
|
||||
// that namespace instead of this file-scope alias.
|
||||
namespace otel_resource = opentelemetry::sdk::resource;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -316,7 +319,7 @@ MetricsRegistry::initExporterAndProvider(std::string const& endpoint, std::strin
|
||||
|
||||
// Configure resource attributes so Prometheus service_instance_id labels
|
||||
// distinguish metrics from different nodes (matches OTelCollector setup).
|
||||
resource::ResourceAttributes attrs;
|
||||
otel_resource::ResourceAttributes attrs;
|
||||
// Use std::string, not a string literal: ResourceAttributes stores an
|
||||
// OTel AttributeValue variant whose char-const* overload binds to bool,
|
||||
// so "xrpld" would be recorded as the boolean true. std::string selects
|
||||
@@ -324,7 +327,7 @@ MetricsRegistry::initExporterAndProvider(std::string const& endpoint, std::strin
|
||||
attrs[opentelemetry::semconv::service::kServiceName] = std::string("xrpld");
|
||||
if (!instanceId.empty())
|
||||
attrs[opentelemetry::semconv::service::kServiceInstanceId] = instanceId;
|
||||
auto resourceAttrs = resource::Resource::Create(attrs);
|
||||
auto resourceAttrs = otel_resource::Resource::Create(attrs);
|
||||
|
||||
// Build a view registry with explicit buckets for the duration
|
||||
// histograms. Without this they use the SDK default buckets (max 10,000),
|
||||
|
||||
Reference in New Issue
Block a user