make jaeger service name configurable

This commit is contained in:
Andrew Dolgov 2023-04-10 07:18:36 +03:00
parent b0fc248c05
commit 7dc83961bd
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
2 changed files with 5 additions and 1 deletions

View File

@ -195,6 +195,9 @@ class Config {
/** host running Jaeger collector to receive traces (disabled if empty) */
const JAEGER_REPORTING_HOST = "JAEGER_REPORTING_HOST";
/** Jaeger service name */
const JAEGER_SERVICE_NAME = "tt-rss";
/** default values for all global configuration options */
private const _DEFAULTS = [
Config::DB_TYPE => [ "pgsql", Config::T_STRING ],
@ -253,6 +256,7 @@ class Config {
Config::T_STRING ],
Config::HTTP_429_THROTTLE_INTERVAL => [ 3600, Config::T_INT ],
Config::JAEGER_REPORTING_HOST => [ "", Config::T_STRING ],
Config::JAEGER_SERVICE_NAME => [ "tt-rss", Config::T_STRING ],
];
/** @var Config|null */

View File

@ -23,7 +23,7 @@ class Tracer {
],
'dispatch_mode' => \Jaeger\Config::JAEGER_OVER_BINARY_UDP,
],
'tt-rss'
Config::get(Config::JAEGER_SERVICE_NAME)
);
$config->initializeTracer();