summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-04-10 07:18:36 +0300
committerAndrew Dolgov <[email protected]>2023-04-10 07:18:36 +0300
commit7dc83961bd617bca6a99ab6f1f840c8b75bf4fe1 (patch)
treed57f6edc1a2e023df3687f05862beebbc85a1a58
parentb0fc248c05f34a57b94117e3f23d0c93cd932318 (diff)
make jaeger service name configurable
-rw-r--r--classes/config.php4
-rw-r--r--classes/tracer.php2
2 files changed, 5 insertions, 1 deletions
diff --git a/classes/config.php b/classes/config.php
index a9c75ae7b..07fecccf4 100644
--- a/classes/config.php
+++ b/classes/config.php
@@ -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 */
diff --git a/classes/tracer.php b/classes/tracer.php
index de3c54cbe..5a23dfeba 100644
--- a/classes/tracer.php
+++ b/classes/tracer.php
@@ -23,7 +23,7 @@ class Tracer {
],
'dispatch_mode' => \Jaeger\Config::JAEGER_OVER_BINARY_UDP,
],
- 'tt-rss'
+ Config::get(Config::JAEGER_SERVICE_NAME)
);
$config->initializeTracer();