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

Add query-tracer to profilecli #2966

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

simonswine
Copy link
Contributor

@simonswine simonswine commented Jan 25, 2024

Query tracer uses distributed tracing to analyse the query statistics of Pyroscope queries.

For a start this only looks at a few aspects, but this can be extended fairly easily, while we don't have to expose further information in the connect API.

 go run ./cmd/profilecli query-tracer --tempo-url="https://1:${LOKI_PASSWORD}@tempo-ops-us-east4.grafana.net/tempo" --interval 10m --filter-sensitive
level=info msg="search for matching traces" start=2024-01-25T18:08:16.486648Z end=2024-01-25T18:18:16.486648Z
level=info msg="found 2 matching traces"
level=info msg="query successfully traced" cluster=ops-us-east-0 duration=5.073891s grafana_plugin=grafana-pyroscope-app grafana_tenant_id=*** grafana_user=*** namespace=profiles-ops-001 query_duration=2h59m59.999s query_end_time=2024-01-24T14:59:59.999Z query_method=/pyroscope/render query_profile_type=process_cpu:cpu:nanoseconds:cpu:nanoseconds query_selector=*** query_start_time=2024-01-24T12:00:00Z request_end_time=2024-01-25T18:13:11.159987Z request_start_time=2024-01-25T18:13:06.086096Z response_size=197435 stats_profiles=700063 stats_profiles_fetched=1.525843e+06 status=200 trace_id=x
level=info msg="query successfully traced" cluster=ops-us-east-0 duration=4.945028s grafana_plugin=grafana-pyroscope-app grafana_tenant_id=*** grafana_user=*** namespace=profiles-ops-001 query_duration=2h59m59.999s query_end_time=2024-01-24T14:59:59.999Z query_method=/pyroscope/render query_profile_type=process_cpu:cpu:nanoseconds:cpu:nanoseconds query_selector=*** query_start_time=2024-01-24T12:00:00Z request_end_time=2024-01-25T18:13:29.474718Z request_start_time=2024-01-25T18:13:24.52969Z response_size=197531 stats_profiles=700063 stats_profiles_fetched=1.525843e+06 status=200 trace_id=x

Query tracer uses distributed tracing to analyse the query statistics of
pyroscope queries.

For a start this only looks at a few aspects, but this can be extended
fairly easily, while we don't have to expose further information in the
connect API.
@simonswine simonswine marked this pull request as ready for review January 26, 2024 10:58
@simonswine simonswine requested review from korniltsev and a team as code owners January 26, 2024 10:58
Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I think we should also fix our tracing integrations that breaks with stream. Not sure if that has affected you though

@simonswine simonswine merged commit b741f49 into grafana:main Feb 5, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants