mirror of
https://github.com/XRPLF/rippled.git
synced 2026-10-25 21:17:28 +00:00
Merge branch 'pratik/otel-phase1b-telemetry-infra' into pratik/otel-phase1c-rpc-integration
This commit is contained in:
3 files changed
+16
-2
No files matched your search
@@ -1,3 +1,5 @@
|
||||
{# Read SANITIZERS first: the next line rebinds `os` from the module to the OS name. #}
|
||||
{% set sanitizers = os.getenv("SANITIZERS", "") %}
|
||||
{% set os = detect_api.detect_os() %}
|
||||
{% set arch = detect_api.detect_arch() %}
|
||||
{% set compiler, version, compiler_exe = detect_api.detect_default_compiler() %}
|
||||
@@ -49,6 +51,17 @@ tools.build:compiler_executables={'c':'{{ cc_exe }}','cpp':'{{ cxx_exe }}'}
|
||||
user.package:cppstd_version=23
|
||||
tools.info.package_id:confs+=["user.package:cppstd_version"]
|
||||
|
||||
{# opentelemetry-cpp is an external dependency: sanitizer reports from its own #}
|
||||
{# code are not ours to fix, so build it without sanitizer checks. #}
|
||||
{# TSan stays on, because it must see the library's atomics or it reports false races. #}
|
||||
{% if sanitizers and compiler != "msvc" %}
|
||||
{% set otel_sanitizer_flags = ["-fno-sanitize=all"] %}
|
||||
{% if "thread" in sanitizers %}
|
||||
{% set _ = otel_sanitizer_flags.append("-fsanitize=thread") %}
|
||||
{% endif %}
|
||||
opentelemetry-cpp/*:tools.build:cxxflags+={{ otel_sanitizer_flags }}
|
||||
{% endif %}
|
||||
|
||||
{% if os == "Macos" %}
|
||||
[buildenv]
|
||||
{# os.version adds -mmacosx-version-min to compiler command lines, #}
|
||||
|
||||
@@ -63,6 +63,7 @@ struct Sections
|
||||
static constexpr auto kSslVerifyDir = "ssl_verify_dir";
|
||||
static constexpr auto kSslVerifyFile = "ssl_verify_file";
|
||||
static constexpr auto kSweepInterval = "sweep_interval";
|
||||
static constexpr auto kTelemetry = "telemetry";
|
||||
static constexpr auto kTransactionQueue = "transaction_queue";
|
||||
static constexpr auto kValidationSeed = "validation_seed";
|
||||
static constexpr auto kValidatorKeys = "validator_keys";
|
||||
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
, telemetry_(
|
||||
telemetry::makeTelemetry(
|
||||
telemetry::makeTelemetrySetup(
|
||||
config_->section("telemetry"),
|
||||
config_->section(Sections::kTelemetry),
|
||||
"", // Updated later via setServiceInstanceId()
|
||||
build_info::getVersionString(),
|
||||
config_->networkId),
|
||||
@@ -1270,7 +1270,7 @@ ApplicationImp::setup(boost::program_options::variables_map const& cmdline)
|
||||
// custom service_instance_id in [telemetry]. The Telemetry object
|
||||
// was constructed with an empty serviceInstanceId because
|
||||
// nodeIdentity_ is not available in the member initializer list.
|
||||
if (!config_->section("telemetry").exists("service_instance_id"))
|
||||
if (!config_->section(Sections::kTelemetry).exists("service_instance_id"))
|
||||
telemetry_->setServiceInstanceId(toBase58(TokenType::NodePublic, nodeIdentity_->first));
|
||||
|
||||
// Start telemetry here, not in start(). Spans are emitted during the rest
|
||||
|
||||
Reference in new issue
Block a user