Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Enable Prometheus metrics for the jaeger client library #10112

Merged
merged 2 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/10112.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Enable Prometheus metrics for the jaeger client library.
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ ignore_missing_imports = True
[mypy-canonicaljson]
ignore_missing_imports = True

[mypy-jaeger_client]
[mypy-jaeger_client.*]
ignore_missing_imports = True

[mypy-jsonschema]
Expand Down
3 changes: 3 additions & 0 deletions synapse/logging/opentracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,13 @@ def init_tracer(hs: "HomeServer"):

set_homeserver_whitelist(hs.config.opentracer_whitelist)

from jaeger_client.metrics.prometheus import PrometheusMetricsFactory

config = JaegerConfig(
config=hs.config.jaeger_config,
service_name="{} {}".format(hs.config.server_name, hs.get_instance_name()),
scope_manager=LogContextScopeManager(hs.config),
metrics_factory=PrometheusMetricsFactory(),
)

# If we have the rust jaeger reporter available let's use that.
Expand Down