Skip to content

Commit

Permalink
[DOC] Fix minor errors in multi-tenancy doc (grafana#3391)
Browse files Browse the repository at this point in the history
* Fix minor errors in multi-tenancy doc

* Update docs/sources/tempo/operations/cross_tenant_query.md
  • Loading branch information
knylander-grafana authored and Koenraad Verheyden committed Feb 26, 2024
1 parent ee83b19 commit 55cdef6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
21 changes: 13 additions & 8 deletions docs/sources/tempo/operations/cross_tenant_query.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,32 @@ aliases:

{{% admonition type="note" %}}
You need to enable `multitenancy_enabled: true` in the cluster for multi-tenant querying to work.
see [enable multi-tenancy]({{< relref "./multitenancy" >}}) for more details and implications of `multitenancy_enabled: true`.
Refer to [Enable multi-tenancy](/docs/tempo/latest/operations/multitenancy/) for more details and implications of `multitenancy_enabled: true`.
{{% /admonition %}}

Tempo supports multi-tenant queries for search, search-tags and trace-by-id search operations.
Tempo supports multi-tenant queries for search, search-tags, and trace-by-ID search operations.

To perform multi-tenant queries, send tenant IDs separated by a `|` character in the `X-Scope-OrgID` header, for e.g: `foo|bar`.
To perform multi-tenant queries, send tenant IDs separated by a `|` character in the `X-Scope-OrgID` header, for example, `foo|bar`.

By default, Cross-tenant query is enabled and can be controlled using `multi_tenant_queries_enabled` configuration setting.
By default, cross-tenant query is enabled and can be controlled using `multi_tenant_queries_enabled` configuration setting.

```yaml
query_frontend:
multi_tenant_queries_enabled: true
```
For more information on configuration options, refer to [Enable multitenancy](https://grafana.com/docs/tempo/latest/operations/multitenancy/).
## TraceQL queries
Queries performed using the cross-tenant configured data source, in either **Explore** or inside of dashboards,
are performed across all the tenants that you specified in the **X-Scope-OrgID** header.
Queries performed using the cross-tenant configured data source, in either **Explore** or inside of dashboards,
are performed across all the tenants that you specified in the **X-Scope-OrgID** header.
TraceQL queries that compare multiple spansets may not correctly return all traces in a cross-tenant query. For instance,
```
{ span.attr1 = "bar" } && { span.attr2 = "foo" }
```
TraceQL evaluates a contiguously stored trace. If these two conditions are satisfied in separate tenants, then Tempo
will not correctly return it.

TraceQL evaluates a contiguously stored trace.
If these two conditions are satisfied in separate tenants, then Tempo doesn't correctly return the trace.
13 changes: 8 additions & 5 deletions docs/sources/tempo/operations/multitenancy.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ aliases:
- /docs/tempo/configuratioon/multitenancy
- /docs/tempo/operations/multitenancy
---

# Enable multi-tenancy

Tempo is a multi-tenant distributed tracing backend. It supports multi-tenancy through the use
of a header: `X-Scope-OrgID`.

If you're interested in setting up multi-tenancy, consult the [multi-tenant example](https://github.com/grafana/tempo/tree/main/example/docker-compose/otel-collector-multitenant)
in the repo. This example uses the following settings to achieve multi-tenancy in Tempo.
in the repository. This example uses the following settings to achieve multi-tenancy in Tempo.

>**Note** Multi-tenancy on ingestion is currently [only working](https://github.com/grafana/tempo/issues/495) with GPRC and this may never change. It is strongly recommended to use the OpenTelemetry Collector to support multi-tenancy.
{{% admonition type="note" %}}
Multi-tenancy on ingestion is currently [only working](https://github.com/grafana/tempo/issues/495) with GPRC and this may never change. It's strongly recommended to use the OpenTelemetry Collector to support multi-tenancy.
{{% /admonition %}}

## Configure multi-tenancy

1. Configure the OTEL Collector to attach the X-Scope-OrgID header on push:
1. Configure the OTEL Collector to attach the `X-Scope-OrgID` header on push:

```
exporters:
Expand All @@ -38,7 +41,7 @@ in the repo. This example uses the following settings to achieve multi-tenancy i
httpHeaderValue1: 'foo-bar-baz'
```

1. Enable multi-tenancy on Tempo backend, set the following configuration value on all Tempo components:
1. Enable multi-tenancy on the Tempo backend by setting the following configuration value on all Tempo components:

```
multitenancy_enabled: true
Expand All @@ -50,7 +53,7 @@ in the repo. This example uses the following settings to achieve multi-tenancy i
--multitenancy.enabled=true
```

This option will force all Tempo components to require the `X-Scope-OrgID` header.
This option forces all Tempo components to require the `X-Scope-OrgID` header.

<!-- Commented out since 7.4 is no longer supported.
### Grafana 7.4.x
Expand Down

0 comments on commit 55cdef6

Please sign in to comment.