mirror of
https://github.com/ceph/ceph
synced 2025-01-10 05:00:59 +00:00
Merge pull request #48709 from yanghonggang/yhg-jaeger-port
common: add a config option for jaeger agent port Reviewed-By: tchaikov, zenomri, yuvalif
This commit is contained in:
commit
75fcae6400
@ -6368,6 +6368,14 @@ options:
|
||||
- rgw
|
||||
- osd
|
||||
with_legacy: true
|
||||
- name: jaeger_agent_port
|
||||
type: int
|
||||
level: advanced
|
||||
desc: port number of the jaeger agent
|
||||
default: 6799
|
||||
services:
|
||||
- rgw
|
||||
- osd
|
||||
- name: mgr_ttl_cache_expire_seconds
|
||||
type: uint
|
||||
level: dev
|
||||
|
@ -24,7 +24,9 @@ Tracer::Tracer(opentelemetry::nostd::string_view service_name) {
|
||||
void Tracer::init(opentelemetry::nostd::string_view service_name) {
|
||||
if (!tracer) {
|
||||
opentelemetry::exporter::jaeger::JaegerExporterOptions exporter_options;
|
||||
exporter_options.server_port = 6799;
|
||||
if (g_ceph_context) {
|
||||
exporter_options.server_port = g_ceph_context->_conf.get_val<int64_t>("jaeger_agent_port");
|
||||
}
|
||||
const opentelemetry::sdk::trace::BatchSpanProcessorOptions processor_options;
|
||||
const auto jaeger_resource = opentelemetry::sdk::resource::Resource::Create(std::move(opentelemetry::sdk::resource::ResourceAttributes{{"service.name", service_name}}));
|
||||
auto jaeger_exporter = std::unique_ptr<opentelemetry::sdk::trace::SpanExporter>(new opentelemetry::exporter::jaeger::JaegerExporter(exporter_options));
|
||||
|
@ -720,6 +720,11 @@ prepare_conf() {
|
||||
$(format_conf "${extra_conf}")
|
||||
$AUTOSCALER_OPTS
|
||||
EOF
|
||||
if [ "$with_jaeger" -eq 1 ] ; then
|
||||
wconf <<EOF
|
||||
jaeger_agent_port = 6831
|
||||
EOF
|
||||
fi
|
||||
if [ "$lockdep" -eq 1 ] ; then
|
||||
wconf <<EOF
|
||||
lockdep = true
|
||||
|
Loading…
Reference in New Issue
Block a user