Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log split queries at query frontend #5703

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Dec 8, 2023

What this PR does:

This pr adds a single counter to querier_stats to count number of queries sent to grpcRoundTripperAdapter, which is basically the number of split queries or number of queries sent to request queue.

Now it will be logged along with the query stats log.

ts=2023-12-08T19:20:28.345331Z caller=handler.go:364 level=info org_id=fake traceID=b3a337ac639f353f7647018811c908c5 msg="query stats" component=query-frontend method=GET path=/prometheus/api/v1/query response_time=10.184291ms query_wall_time_seconds=0.065051376 fetched_series_count=0 fetched_chunks_count=0 fetched_samples_count=0 fetched_chunks_bytes=0 fetched_data_bytes=0 split_queries=10 status_code=200 response_size=63 shard_by.is_shardable=true shard_by.num_shards=10 shard_by.sharding_labels=[job] query_length=16 user_agent=PostmanRuntime/7.35.0 param_query="sum(up) by (job)"

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
@yeya24 yeya24 merged commit 605e1ed into cortexproject:master Dec 12, 2023
14 checks passed
@yeya24 yeya24 deleted the log-split-queries branch December 12, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants