mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-12 04:50:39 +00:00
throw exception when promethues is not enabled
This commit is contained in:
parent
cce217bab8
commit
23c1aa4504
1 changed files with 2 additions and 2 deletions
|
@ -268,8 +268,8 @@ class TelemetryAdapter(TelemetryDatasetMixin, Telemetry):
|
||||||
query_type: MetricQueryType = MetricQueryType.RANGE,
|
query_type: MetricQueryType = MetricQueryType.RANGE,
|
||||||
label_matchers: Optional[List[MetricLabelMatcher]] = None,
|
label_matchers: Optional[List[MetricLabelMatcher]] = None,
|
||||||
) -> GetMetricsResponse:
|
) -> GetMetricsResponse:
|
||||||
if TelemetrySink.OTEL not in self.config.sinks:
|
if self.prom is None:
|
||||||
return GetMetricsResponse(data=[])
|
raise ValueError("Prometheus endpoint not configured")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Build query with label matchers if provided
|
# Build query with label matchers if provided
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue