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 @@ -1238,6 +1238,13 @@ metrics:
1238
1238
type : string
1239
1239
example : ~
1240
1240
default : " False"
1241
+ otel_service :
1242
+ description : |
1243
+ The default service name of traces.
1244
+ version_added : 2.10.3
1245
+ type : string
1246
+ example : ~
1247
+ default : " Airflow"
1241
1248
otel_ssl_active :
1242
1249
description : |
1243
1250
If ``True``, SSL will be enabled. Defaults to ``False``.
Original file line number Diff line number Diff line change @@ -408,8 +408,9 @@ def get_otel_logger(cls) -> SafeOtelLogger:
408
408
# PeriodicExportingMetricReader will default to an interval of 60000 millis.
409
409
interval = conf .getint ("metrics" , "otel_interval_milliseconds" , fallback = None ) # ex: 30000
410
410
debug = conf .getboolean ("metrics" , "otel_debugging_on" )
411
+ service_name = conf .get ("metrics" , "otel_service" )
411
412
412
- resource = Resource (attributes = {SERVICE_NAME : "Airflow" })
413
+ resource = Resource (attributes = {SERVICE_NAME : service_name })
413
414
414
415
protocol = "https" if ssl_active else "http"
415
416
endpoint = f"{ protocol } ://{ host } :{ port } /v1/metrics"
You can’t perform that action at this time.
0 commit comments