Skip to content

Commit 2fa86b9

Browse files
authored
Add prometheus metric tests based on a fictional electricity bidding market (#1069)
1 parent 243037e commit 2fa86b9

File tree

18 files changed

+1372
-3
lines changed

18 files changed

+1372
-3
lines changed

tests/llm/fixtures/shared/python-flask-otel/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM python:3.11-slim
22

33
# Install Flask and OpenTelemetry packages (for Tempo-based tests)
44
# Plus additional packages needed for New Relic-based tests
5+
# Plus prometheus_client for Prometheus-based tests
56
RUN pip install --no-cache-dir \
67
flask==3.1.2 \
78
opentelemetry-api==1.37.0 \
@@ -12,7 +13,8 @@ RUN pip install --no-cache-dir \
1213
opentelemetry-exporter-otlp-proto-grpc==1.37.0 \
1314
opentelemetry-proto==1.37.0 \
1415
opentelemetry-semantic-conventions==0.58b0 \
15-
requests==2.32.3
16+
requests==2.32.3 \
17+
prometheus-client==0.21.1
1618

1719
# Create app directory
1820
RUN mkdir /app

tests/llm/fixtures/shared/python-flask-otel/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -e
66

77
REGISTRY="me-west1-docker.pkg.dev/robusta-development/development"
88
IMAGE_NAME="python-flask-otel"
9-
IMAGE_TAG="2.1"
9+
IMAGE_TAG="2.2"
1010
FULL_IMAGE="${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}"
1111
LOCAL_IMAGE="holmes-test/${IMAGE_NAME}:${IMAGE_TAG}"
1212

@@ -33,3 +33,4 @@ echo " - OpenTelemetry API & SDK 1.37.0"
3333
echo " - OpenTelemetry Flask instrumentation 0.58b0"
3434
echo " - OpenTelemetry OTLP gRPC exporter 1.37.0"
3535
echo " - Requests 2.32.3"
36+
echo " - Prometheus Client 0.21.1"

tests/llm/fixtures/test_ask_holmes/124_checkout_latency_prometheus/test_case.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
user_prompt:
2-
- "The checkout service in namespace app-124 is experiencing high latency. Investigate why."
2+
- "The /checkout endpoint in namespace app-124 is experiencing high latency. Investigate why."
33
# Note telling holmes to focus on http_request_duration_seconds_bucket metric passes with sonnet - 'The checkout service in namespace app-124 is experiencing high latency. Investigate why. USE prometheus and http_request_duration_seconds_bucket'
44

55
expected_output:

0 commit comments

Comments
 (0)