File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1232,6 +1232,13 @@ metrics:
1232
1232
type : string
1233
1233
example : ~
1234
1234
default : " False"
1235
+ otel_service :
1236
+ description : |
1237
+ The default service name of traces.
1238
+ version_added : 2.10.3
1239
+ type : string
1240
+ example : ~
1241
+ default : " Airflow"
1235
1242
otel_ssl_active :
1236
1243
description : |
1237
1244
If ``True``, SSL will be enabled. Defaults to ``False``.
Original file line number Diff line number Diff line change @@ -396,8 +396,9 @@ def get_otel_logger(cls) -> SafeOtelLogger:
396
396
# PeriodicExportingMetricReader will default to an interval of 60000 millis.
397
397
interval = conf .getint ("metrics" , "otel_interval_milliseconds" , fallback = None ) # ex: 30000
398
398
debug = conf .getboolean ("metrics" , "otel_debugging_on" )
399
+ service_name = conf .get ("metrics" , "otel_service" )
399
400
400
- resource = Resource (attributes = {SERVICE_NAME : "Airflow" })
401
+ resource = Resource (attributes = {SERVICE_NAME : service_name })
401
402
402
403
protocol = "https" if ssl_active else "http"
403
404
endpoint = f"{ protocol } ://{ host } :{ port } /v1/metrics"
You can’t perform that action at this time.
0 commit comments