Skip to content

Commit d72c274

Browse files
authored
Added logs to metrics queries for troubleshooting (#883)
log-query
1 parent abdc036 commit d72c274

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

benchmarks/benchmark/tools/profile-generator/container/benchmark_serving.py

+3
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,12 @@ def print_metrics(metrics: List[str], duration: float, backend: str):
610610
url='https://monitoring.googleapis.com/v1/projects/%s/location/global/prometheus/api/v1/query' % (project_id)
611611
headers_api = {'Authorization': 'Bearer ' + credentials.token}
612612
params = {'query': query}
613+
print(f"Finding {query_name} {metric} with the following query: {query}")
613614
request_post = requests.get(url=url, headers=headers_api, params=params)
614615
response = request_post.json()
615616

617+
print(f"Got response from metrics server: {response}")
618+
616619
# handle response
617620
if request_post.ok:
618621
if response["status"] == "success":

0 commit comments

Comments
 (0)