Skip to content

Add support for multi-tenant queries - #3087

Merged
mdisibio merged 34 commits into
grafana:mainfrom
electron0zero:add_federation
Dec 18, 2023
Merged

Add support for multi-tenant queries#3087
mdisibio merged 34 commits into
grafana:mainfrom
electron0zero:add_federation

Conversation

@electron0zero

@electron0zero electron0zero commented Oct 30, 2023

Copy link
Copy Markdown
Member

What this PR does:

Add multi-tenant query support in selected routes:

  • TraceByID
  • Search
  • SearchTags
  • SearchTagsV2
  • SearchTagsValues
  • SearchTagsValuesV2

Note: SpanMetricsSummary and Streaming Search endpoints does not support multi-tenant queries.

Which issue(s) this PR fixes:
Fixes #1858

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
Comment thread modules/frontend/combiner/search.go
Comment thread modules/frontend/combiner/search.go Outdated
Comment thread modules/frontend/combiner/search_tag_values.go
@knylander-grafana

Copy link
Copy Markdown
Contributor

@electron0zero We have some doc for multi-tenant stuff in GET, if this is similar to federation frontend and cross-tenant query. Happy to point you to that content. We just updated it.

Comment thread integration/e2e/multi_tenant_test.go
Comment thread integration/e2e/multi_tenant_test.go Outdated
Comment thread integration/e2e/multi_tenant_test.go Outdated
Comment thread modules/frontend/combiner/interface.go Outdated
Comment thread modules/frontend/combiner/search.go Outdated
Comment thread modules/frontend/combiner/search.go
Comment thread modules/frontend/tenant.go Outdated
Comment thread modules/frontend/tenant.go
@electron0zero

Copy link
Copy Markdown
Member Author

@electron0zero We have some doc for multi-tenant stuff in GET, if this is similar to federation frontend and cross-tenant query. Happy to point you to that content. We just updated it.

@knylander-grafana added docs https://github.com/grafana/tempo/pull/3087/files?short_path=9270c41#diff-9270c41ebeff244ecbc46a0d2f63bbe0e11cc7f4a06c13511e7e71d49c29bade

Comment thread docs/sources/tempo/operations/cross_tenant_query.md Outdated
Comment thread docs/sources/tempo/operations/cross_tenant_query.md Outdated
Comment thread docs/sources/tempo/operations/cross_tenant_query.md Outdated
Comment thread docs/sources/tempo/operations/cross_tenant_query.md Outdated
Comment thread docs/sources/tempo/operations/cross_tenant_query.md Outdated
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Comment thread docs/sources/tempo/operations/cross_tenant_query.md Outdated
Comment thread docs/sources/tempo/operations/cross_tenant_query.md Outdated
Comment thread docs/sources/tempo/operations/cross_tenant_query.md Outdated
Comment thread docs/sources/tempo/operations/cross_tenant_query.md Outdated
Comment thread docs/sources/tempo/operations/cross_tenant_query.md Outdated

@knylander-grafana knylander-grafana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving the doc. Thank you for adding this!

@mdisibio
mdisibio merged commit 0fc6bf1 into grafana:main Dec 18, 2023
@electron0zero
electron0zero deleted the add_federation branch January 9, 2024 15:25
@knylander-grafana knylander-grafana added the type/docs Improvements or additions to documentation label Jan 23, 2024
electron0zero added a commit that referenced this pull request Jan 25, 2024
Add multi-tenant query support in streaming search endpoints.

follow up on #3087
mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
* Add combiners to frontend

---------

Co-authored-by: Mario <mariorvinas@gmail.com>

* Add MultiTenantQueriesEnabled config in frontend

* Add MultiTenantMiddleware and tests

---------

Co-authored-by: Mario <mariorvinas@gmail.com>

* Expose dedicated handler in queryfrontend for each http endpoint

* Add multi-tenant middleware in multi-tenant routes

* ignore e2e test folder

* fix up

* search methods on client

* Add e2e test TestMultiTenantSearch

* Add NewSearchTagsV2 combiner

* test are passing...

* test cleanup

* docs & todos

* make lint happy

* use distinct value collector

* Add docs

* remove callback from combiner AddRequest

* leave a todo to merge CombineSearchResults

* return multi-tenant query unsupported for metrics endpoint

* add a note on testing search streaming locally

* update docs for lowercase headers

* streaming search endpoints unsupported error

* multi-tenant works in streaming search? who knows?

* remove todo

* update gitignore & local docker-compose file

* test unsupported endpoints in e2e search

* Update CHANGELOG.md

* Add tests for unsupprted endpoints

* more cleanup

* fix lint

* fix golangci

* assert response for tags endpoints

* docs feedback

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* reword and fix docs

---------

Co-authored-by: Mario <mariorvinas@gmail.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
Add multi-tenant query support in streaming search endpoints.

follow up on grafana#3087
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/docs Improvements or additions to documentation

4 participants