File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1818
1919
2020def configure_aspire_dashboard (service_name : str = "expenses-mcp" ):
21- """Configure OpenTelemetry to send telemetry to the Aspire standalone dashboard."""
22- otlp_endpoint = os .getenv ("OTEL_EXPORTER_OTLP_ENDPOINT" , "http://localhost:4317" )
21+ """Configure OpenTelemetry to send telemetry to the Aspire standalone dashboard.
22+
23+ Requires the OTEL_EXPORTER_OTLP_ENDPOINT environment variable to be set.
24+ """
25+ otlp_endpoint = os .getenv ("OTEL_EXPORTER_OTLP_ENDPOINT" )
26+ if not otlp_endpoint :
27+ raise ValueError (
28+ "OTEL_EXPORTER_OTLP_ENDPOINT environment variable must be set to configure telemetry export."
29+ )
2330
2431 # Create resource with service name
2532 resource = Resource .create ({"service.name" : service_name })
You can’t perform that action at this time.
0 commit comments