Merge branch 'pratik/otel-phase6-statsd' into pratik/otel-phase7-native-metrics

This commit is contained in:
Pratik Mankawde committed 2026-10-02 12:20:52 +01:00
commit dd48fe8dc8
2 files changed
+19 -2

No files matched your search

+4 -2
View File
@@ -1744,8 +1744,10 @@ validators.txt
# use_tls=0
#
# Whether to hand tls_ca_cert to the exporter as its CA bundle. TLS is
# selected by the scheme of traces_endpoint, not by this key; setting it
# to 1 only supplies a custom CA file for verifying the collector.
# selected by the scheme of traces_endpoint, not by this key. So with
# enabled=1, use_tls=1 requires traces_endpoint to start with https://
# (lower case). Any other URL, including the default, makes xrpld fail
# to start with a message that names traces_endpoint.
# Default: 0 (no CA file is passed, so the exporter keeps its own
# default trust store).
#
@@ -863,6 +863,21 @@ TEST(TelemetryConfig, mtls_scheme_check_is_case_sensitive_like_the_exporter)
ThrowsMessage<std::runtime_error>(HasSubstr(mtls::schemeError)));
}
TEST(TelemetryConfig, one_way_tls_on_an_https_scheme_without_slashes_throws)
{
// The guard requires the whole "https://" prefix. This URL has "https:"
// but no slashes, so a guard cut down to "https:" or "https" accepts it
// and this test fails. No client certificate or CA is set, so the scheme
// guard is the only check that can throw here.
EXPECT_EQ(
batchRejection(
{{"enabled", "1"},
{"use_tls", "1"},
{mtls::keyEndpoint, "https:collector:4318/v1/traces"}}),
"Invalid value 'traces_endpoint' in [telemetry]: must start with 'https://' when "
"use_tls=1, but is 'https:collector:4318/v1/traces'.");
}
TEST(TelemetryConfig, one_way_tls_on_a_plain_http_endpoint_throws)
{
// use_tls=1 with no client certificate, on an http:// endpoint. The