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 parameter to search API for traceQL queries #1729

Merged
merged 6 commits into from
Sep 9, 2022

Conversation

kvrhdn
Copy link
Member

@kvrhdn kvrhdn commented Sep 9, 2022

What this PR does:
Extends the search API to accept a query parameter q which can optionally contain a traceQL query. Query is already validated but not yet implemented (it will return 501 Not Implemented).

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added I'll add docs once traceQL queries are implemented
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@@ -21,6 +23,7 @@ import (
const (
URLParamTraceID = "traceID"
// search
urlParamQuery = "q"
Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed Loki and Prometheus both use query instead. I think we opted for q since this is least likely to conflict with tag lookups using the old top-level query parameters.

Loki's API: https://grafana.com/docs/loki/latest/api/#query-loki
Prometheus' API: https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries

Copy link
Member

Choose a reason for hiding this comment

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

I'm good on q

pkg/tempopb/tempo.proto Outdated Show resolved Hide resolved
pkg/api/http.go Outdated Show resolved Hide resolved
@kvrhdn kvrhdn enabled auto-merge (squash) September 9, 2022 16:07
@kvrhdn kvrhdn merged commit 38d8d98 into grafana:main Sep 9, 2022
@kvrhdn kvrhdn deleted the kvrhdn/traceql-api branch September 9, 2022 16:24
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