mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-25 11:05:49 +03:00
Enable Prometheus metrics for the jaeger client library (#10112)
This commit is contained in:
parent
fd9856e4a9
commit
d8be7d493d
3 changed files with 5 additions and 1 deletions
1
changelog.d/10112.misc
Normal file
1
changelog.d/10112.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Enable Prometheus metrics for the jaeger client library.
|
2
mypy.ini
2
mypy.ini
|
@ -130,7 +130,7 @@ ignore_missing_imports = True
|
||||||
[mypy-canonicaljson]
|
[mypy-canonicaljson]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
||||||
[mypy-jaeger_client]
|
[mypy-jaeger_client.*]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
||||||
[mypy-jsonschema]
|
[mypy-jsonschema]
|
||||||
|
|
|
@ -362,10 +362,13 @@ def init_tracer(hs: "HomeServer"):
|
||||||
|
|
||||||
set_homeserver_whitelist(hs.config.opentracer_whitelist)
|
set_homeserver_whitelist(hs.config.opentracer_whitelist)
|
||||||
|
|
||||||
|
from jaeger_client.metrics.prometheus import PrometheusMetricsFactory
|
||||||
|
|
||||||
config = JaegerConfig(
|
config = JaegerConfig(
|
||||||
config=hs.config.jaeger_config,
|
config=hs.config.jaeger_config,
|
||||||
service_name="{} {}".format(hs.config.server_name, hs.get_instance_name()),
|
service_name="{} {}".format(hs.config.server_name, hs.get_instance_name()),
|
||||||
scope_manager=LogContextScopeManager(hs.config),
|
scope_manager=LogContextScopeManager(hs.config),
|
||||||
|
metrics_factory=PrometheusMetricsFactory(),
|
||||||
)
|
)
|
||||||
|
|
||||||
# If we have the rust jaeger reporter available let's use that.
|
# If we have the rust jaeger reporter available let's use that.
|
||||||
|
|
Loading…
Reference in a new issue