File tree Expand file tree Collapse file tree 4 files changed +34
-5
lines changed
diracx-routers/src/diracx/routers Expand file tree Collapse file tree 4 files changed +34
-5
lines changed Original file line number Diff line number Diff line change 9999 entry : pixi run -e default python scripts/generate_settings_docs.py
100100 language : system
101101 pass_filenames : false
102- files : ^(diracx-.*/src/diracx/.*/settings\.py|docs/.*\.j2|docs/templates/.*\.jinja|scripts/generate_settings_docs\.py)$
102+ files : ^(diracx-.*/src/diracx/.*/settings\.py|diracx-routers/src/diracx/routers/otel\.py| docs/.*\.j2|docs/templates/.*\.jinja|scripts/generate_settings_docs\.py)$
Original file line number Diff line number Diff line change 3535class OTELSettings (ServiceSettingsBase ):
3636 """Settings for the Open Telemetry Configuration."""
3737
38- model_config = SettingsConfigDict (env_prefix = "DIRACX_OTEL_" )
38+ model_config = SettingsConfigDict (
39+ env_prefix = "DIRACX_OTEL_" , use_attribute_docstrings = True
40+ )
3941
4042 enabled : bool = False
43+ """
44+ Whether OpenTelemetry is enabled.
45+ """
46+
4147 application_name : str = "diracx"
48+ """
49+ The name of the application for OpenTelemetry.
50+ """
51+
4252 grpc_endpoint : str = ""
53+ """
54+ The gRPC endpoint for the OpenTelemetry collector.
55+ """
56+
4357 grpc_insecure : bool = True
44- # headers to pass to the OTEL Collector
45- # e.g. {"tenant_id": "lhcbdiracx-cert"}
58+ """
59+ Whether to use an insecure gRPC connection for the OpenTelemetry collector.
60+ """
61+
4662 headers : Optional [dict [str , str ]] = None
63+ """
64+ A JSON-encoded dictionary of headers to pass to the OpenTelemetry collector, e.g. {"tenant_id": "lhcbdiracx-cert"}.
65+ """
4766
4867
4968def instrument_otel (app : FastAPI ) -> None :
Original file line number Diff line number Diff line change @@ -189,18 +189,28 @@ Settings for the Open Telemetry Configuration.
189189
190190* Optional* , default value: ` False `
191191
192+ Whether OpenTelemetry is enabled.
193+
192194### ` DIRACX_OTEL_APPLICATION_NAME `
193195
194196* Optional* , default value: ` diracx `
195197
198+ The name of the application for OpenTelemetry.
199+
196200### ` DIRACX_OTEL_GRPC_ENDPOINT `
197201
198202* Optional* , default value: \`\`
199203
204+ The gRPC endpoint for the OpenTelemetry collector.
205+
200206### ` DIRACX_OTEL_GRPC_INSECURE `
201207
202208* Optional* , default value: ` True `
203209
210+ Whether to use an insecure gRPC connection for the OpenTelemetry collector.
211+
204212### ` DIRACX_OTEL_HEADERS `
205213
206214* Optional* , default value: ` None `
215+
216+ A JSON-encoded dictionary of headers to pass to the OpenTelemetry collector, e.g. {"tenant_id": "lhcbdiracx-cert"}.
Original file line number Diff line number Diff line change 11[workspace ]
22channels = [" conda-forge" ]
3- platforms = [" linux-64" , " osx-arm64" ]
3+ platforms = [" linux-64" , " osx-arm64" , " osx-64 " ]
44
55[dependencies ]
66python = " >=3.11.3,<3.12"
You can’t perform that action at this time.
0 commit comments