Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions docs/sources/tempo/api_docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Agent, OpenTelemetry Collector, or Jaeger Agent.
| Jaeger | gRPC | [Link](https://www.jaegertracing.io/docs/latest/apis/#span-reporting-apis) |
| Zipkin | HTTP | [Link](https://zipkin.io/zipkin-api/) |

For information on how to use the Zipkin endpoint with curl (for debugging purposes), refer to [Pushing spans with HTTP]({{< relref "./pushing-spans-with-http" >}}).
For information on how to use the Zipkin endpoint with curl (for debugging purposes), refer to [Pushing spans with HTTP](https://grafana.com/docs/tempo/<TEMPO_VERSION>/api_docs/pushing-spans-with-http/).

### Query

Expand Down Expand Up @@ -204,7 +204,7 @@ but if it can also send OpenTelemetry proto if `Accept: application/protobuf` is
### Search

The Tempo Search API finds traces based on span and process attributes (tags and values). Note that search functionality is **not** available on
[v2 blocks]({{< relref "../configuration/parquet#choose-a-different-block-format" >}}).
[v2 blocks](https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/parquet/#choose-a-different-block-format).

When performing a search, Tempo does a massively parallel search over the given time range, and takes the first N results. Even identical searches differs due to things like machine load and network latency. TraceQL follows the same behavior.

Expand All @@ -221,11 +221,11 @@ The URL query parameters support the following values:

**Parameters for TraceQL Search**

- `q = (TraceQL query)`: Url encoded [TraceQL query]({{< relref "../traceql" >}}).
- `q = (TraceQL query)`: URL encoded [TraceQL query](../traceql).

**Parameters for Tag Based Search**

- `tags = (logfmt)`: logfmt encoding of any span-level or process-level attributes to filter on. The value is matched as a case-insensitive substring. Key-value pairs are separated by spaces. If a value contains a space, it should be enclosed within double quotes.
- `tags = (logfmt)`: `logfmt` encoding of any span-level or process-level attributes to filter on. The value is matched as a case-insensitive substring. Key-value pairs are separated by spaces. If a value contains a space, it should be enclosed within double quotes.
- `minDuration = (go duration value)`
Optional. Find traces with at least this duration. Duration values are of the form `10s` for 10 seconds, `100ms`, `30m`, etc.
- `maxDuration = (go duration value)`
Expand All @@ -234,7 +234,7 @@ The URL query parameters support the following values:
**Parameters supported for all searches**

- `limit = (integer)`
Optional. Limit the number of search results. Default is 20, but this is configurable in the querier. Refer to [Configuration]({{< relref "../configuration#querier" >}}).
Optional. Limit the number of search results. Default is 20, but this is configurable in the querier. Refer to [Configuration](https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/#querier).
- `start = (unix epoch seconds)`
Optional. Along with `end` define a time range from which traces should be returned.
- `end = (unix epoch seconds)`
Expand Down Expand Up @@ -544,7 +544,7 @@ Parameters:

This endpoint retrieves all discovered values and their data types for the given TraceQL identifier.
The endpoint is available in the query frontend service in a microservices deployment, or the Tempo endpoint in a monolithic mode deployment. This endpoint is similar to `/api/search/tag/<tag>/values` but operates on TraceQL identifiers and types.
Refer to [TraceQL]({{< relref "../traceql" >}}) documentation for more information.
Refer to [TraceQL](../traceql) documentation for more information.

#### Example

Expand Down Expand Up @@ -600,7 +600,7 @@ Parameters:
#### Filtered tag values

You can pass an optional URL query parameter, `q`, to your request.
The `q` parameter is a URL-encoded [TraceQL query]({{< relref "../traceql" >}}).
The `q` parameter is a URL-encoded [TraceQL query](../traceql).
If provided, the tag values returned by the API are filtered to only return values seen on spans matching your filter parameters.

Queries can be incomplete: for example, `{ resource.cluster = }`.
Expand Down Expand Up @@ -658,7 +658,8 @@ GET /api/metrics/query_range?q={resource.service.name="myservice"} | min_over_ti

#### Instant

The instant version of the metrics API is similar to the range version, but instead returns a single value for the query. This version is useful when you don't need the granularity of a full time-series, but instead want a total sum, or single value computed across the whole time range.
The instant version of the metrics API is similar to the range version, but instead returns a single value for the query.
This version is useful when you don't need the granularity of a full time-series, but instead want a total sum, or single value computed across the whole time range.

The parameters are identical to the range version except there is no `step`.

Expand Down Expand Up @@ -732,14 +733,14 @@ This is usually used at the time of scaling down a cluster.
### Usage metrics

{{< admonition type="note" >}}
This endpoint is only available when one or more usage trackers are enabled in [the distributor]({{< relref "../configuration#distributor" >}}).
This endpoint is only available when one or more usage trackers are enabled in [the distributor](https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/#distributor).
{{< /admonition >}}

```
GET /usage_metrics
```

Special metrics scrape endpoint that provides per-tenant metrics on ingested data. Per-tenant grouping rules are configured in [the per-tenant overrides]({{< relref "../configuration#overrides" >}})
Special metrics scrape endpoint that provides per-tenant metrics on ingested data. Per-tenant grouping rules are configured in [the per-tenant overrides](https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/#overrides)

Example:
```
Expand Down Expand Up @@ -786,7 +787,7 @@ GET /metrics-generator/ring

Displays a web page with the metrics-generator hash ring status, including the state, health, and last heartbeat time of each metrics-generator.

This endpoint is only available when the metrics-generator is enabled. Refer to [metrics-generator]({{< relref "../configuration#metrics-generator" >}}).
This endpoint is only available when the metrics-generator is enabled. Refer to [metrics-generator](https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/#metrics-generator).

For more information, refer to [consistent hash ring](http://grafana.com/docs/tempo/<TEMPO_VERSION>/operations/manage-advanced-systems/consistent_hash_ring/).

Expand Down
8 changes: 4 additions & 4 deletions docs/sources/tempo/api_docs/metrics-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ If you want something faster than typing these queries out in Explore's code mod

## Activate metrics summary

To enable the (deprecated) metrics summary API, you must turn on the local blocks processor in the metrics generator.
To enable the deprecated) metrics summary API, you must turn on the local blocks processor in the metrics generator.
Be aware that the generator uses considerably more resources, including disk space, if it's enabled:

```yaml
Expand Down Expand Up @@ -121,7 +121,7 @@ message TraceQLStatic {
The response is returned as JSON following [standard protobuf->JSON mapping rules](https://protobuf.dev/programming-guides/proto3/#json).

{{< admonition type="note" >}}
The `uint64` fields cannot be fully expressed by JSON numeric values so the fields are serialized as strings.
The `uint64` fields can't be fully expressed by JSON numeric values so the fields are serialized as strings.
{{< /admonition >}}

Example:
Expand Down Expand Up @@ -152,8 +152,8 @@ Example:
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `summaries` | The list of metrics per group. |
| `.spanCount` | Number of spans in this group. |
| `.errorSpanCount` | Number of spans with `status`=`error`. (This field will not be present if the value is `0`.) |
| `.series` | The unique values for this group. A key/value pair will be returned for each entry in `groupBy`. |
| `.errorSpanCount` | Number of spans with `status`=`error`. (This field isn't present if the value is `0`.) |
| `.series` | The unique values for this group. A key/value pair is returned for each entry in `groupBy`. |
| `.key` | Key name. |
| `.value` | Value with TraceQL underlying type. |
| `.type` | Data type `enum`` defined [here](https://github.com/grafana/tempo/blob/main/pkg/traceql/enum_statics.go#L8) (This field will not be present if the value is `0`.) <br/>0 = `nil`<br/>3 = `integer`<br/> 4 = `float` <br/> 5 = `string`<br/> 6 = `bool`<br/> 7 = `duration`<br/> 8 = span status<br/> 9 = span kind |
Expand Down
14 changes: 7 additions & 7 deletions docs/sources/tempo/api_docs/pushing-spans-with-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ pushing spans with HTTP/JSON from a Bash script using the [OpenTelemetry](https:

## Before you begin

This procedure uses an example Docker Compose setup to run Tempo, so you do not need an existing installation. The Docker image also includes a Grafana container which will allow us to visualize traces.
This procedure uses an example Docker Compose setup to run Tempo, so you don't need an existing installation. The Docker image also includes a Grafana container which lets you visualize traces.

To use this procedure, you need to have Docker and `docker compose` installed.


## Start Tempo using the quick start

Use the instructions in the [Quick start for Tempo documentation]({{< relref "../getting-started/docker-example" >}}) to start a local instance of Tempo and Grafana.
Use the instructions in the [Quick start for Tempo documentation](https://grafana.com/docs/tempo/<TEMPO_VERSION>/getting-started/docker-example/) to start a local instance of Tempo and Grafana.

## Push spans with OTLP

Expand Down Expand Up @@ -98,7 +97,7 @@ Multiple the milliseconds value by 1,000,000 to turn it into nanoseconds. You ca

The easiest way to get the trace is to execute a simple curl command to Tempo. The returned format is [OTLP](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto).

1. Replace the trace ID in the `curl` command with the trace ID that was generated from the push. This information is is in the data that's sent with the `curl`. You could use Grafana’s Explorer page to find this, as shown in the previous section.
1. Replace the trace ID in the `curl` command with the trace ID that was generated from the push. This information is in the data that's sent with the `curl`. You could use Grafana’s Explorer page to find this, as shown in the previous section.

```bash
curl http://localhost:3200/api/v2/traces/5b8efff798038103d269b633813fc700
Expand All @@ -110,7 +109,7 @@ The easiest way to get the trace is to execute a simple curl command to Tempo. T

### Use TraceQL to search for a trace

Alternatively, you can also use [TraceQL]({{< relref "../traceql" >}}) to search for the trace that was pushed.
Alternatively, you can also use [TraceQL](../traceql) to search for the trace that was pushed.
You can search by using the unique trace attributes that were set:

```bash
Expand All @@ -127,8 +126,9 @@ curl -G -s http://localhost:3200/api/search --data-urlencode 'q={ .service.name

## Spans from everything

Tracing is not limited to enterprise languages with complex frameworks. As you can see it's easy to store and track events from your js, python or bash scripts.
You can use Tempo/distributed tracing today to trace CI pipelines, long running bash processes, python data processing flows, or anything else
Tracing isn't limited to enterprise languages with complex frameworks.
As you can see, it's easy to store and track events from your js, python or bash scripts.
You can use Tempo and distributed tracing today to trace CI pipelines, long running bash processes, python data processing flows, or anything else
you can think of.

Happy tracing!
36 changes: 29 additions & 7 deletions docs/sources/tempo/getting-started/_index.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
---
title: Get started with Grafana Tempo
title: Get started
menuTitle: Get started
description: Learn about Tempo architecture, concepts, and first steps.
weight: 200
aliases:
- /docs/tempo/getting-started
refs:
examples:
- pattern: /docs/tempo/
destination: https://grafana.com/docs/tempo/<TEMPO_VERSION>/getting-started/example-demo-app/
- pattern: /docs/enterprise-traces/
destination: https://grafana.com/docs/enterprise-traces/<ENTERPRISE_TRACES_VERSION>/setup/
setup:
- pattern: /docs/tempo/
destination: https://grafana.com/docs/tempo/<TEMPO_VERSION>/setup/
- pattern: /docs/enterprise-traces/
destination: https://grafana.com/docs/enterprise-traces/<ENTERPRISE_TRACES_VERSION>/setup/
deploy:
- pattern: /docs/tempo/
destination: https://grafana.com/docs/tempo/<TEMPO_VERSION>/setup/deployment/
- pattern: /docs/enterprise-traces/
destination: https://grafana.com/docs/enterprise-traces/<ENTERPRISE_TRACES_VERSION>/setup/hardware-requirements/
configure-alloy:
- pattern: /docs/tempo/
destination: https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/grafana-alloy/
- pattern: /docs/enterprise-traces/
destination: https://grafana.com/docs/enterprise-traces/<ENTERPRISE_TRACES_VERSION>/setup/set-up-get-tenants/
---

# Get started with Grafana Tempo
# Get started

Grafana Tempo is an open source, easy-to-use, and high-scale distributed tracing backend. Tempo lets you search for traces, generate metrics from spans, and link your tracing data with logs and metrics.
Grafana Tempo also powers Grafana Cloud Traces and Grafana Enterprise Traces.

Distributed tracing visualizes the lifecycle of a request as it passes through a set of applications.
For more information about traces, refer to [Introduction to traces](https://grafana.com/docs/tempo/<TEMPO_VERSION>/introduction/).

Getting started with Tempo is follows these basic steps.

First, check out the [examples](https://grafana.com/docs/tempo/<TEMPO_VERSION>/getting-started/example-demo-app/) for ideas on how to get started with Tempo.
First, check out the [examples](ref:examples) for ideas on how to get started.

Next, review the [Setup documentation](https://grafana.com/docs/tempo/<TEMPO_VERSION>/setup/) for step-by-step instructions for setting up Tempo and creating a test application.
Next, review the [Setup documentation](ref:setup) for step-by-step instructions.

Tempo offers different deployment options, depending on your needs. Refer to the [plan your deployment](https://grafana.com/docs/tempo/<TEMPO_VERSION>/setup/deployment/) section for more information.
Tempo offers different deployment options, depending on your needs. Refer to the [plan your deployment](ref:deploy) section for more information.

{{< admonition type="note" >}}
Grafana Alloy is already set up to use Tempo.
Expand Down Expand Up @@ -57,13 +79,13 @@ offloads spans from your application, buffers them, and forwards them to a backe
Tracing pipelines are optional since most clients can send directly to Tempo.
The pipelines become more critical the larger and more robust your tracing system is.

Grafana Alloy is a service that is deployed close to the application, either on the same node or
Grafana Alloy is a service that's deployed close to the application, either on the same node or
within the same cluster (in Kubernetes) to quickly offload traces from the application and forward them to
a storage backend.
Alloy also abstracts features like trace batching to a remote trace backend store, including retries on write failures.

To learn more about Grafana Alloy and how to set it up for tracing with Tempo,
refer to [Grafana Alloy configuration for tracing](https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/grafana-alloy/).
refer to [Grafana Alloy configuration for tracing](ref:configure-alloy).

{{< admonition type="note" >}}
The [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) / [Jaeger Agent](https://www.jaegertracing.io/docs/latest/deployment/) can also be used at the agent layer.
Expand Down
12 changes: 6 additions & 6 deletions docs/sources/tempo/getting-started/example-demo-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ The following examples show various deployment and configuration options using t

For more information about Tempo setup and configuration, see:

* [Set up Tempo]({{< relref "../setup" >}})
* [Tempo configuration]({{< relref "../configuration" >}})
* [Set up Tempo](../setup)
* [Tempo configuration](../configuration)

If you are interested in instrumentation, see [Tempo instrumentation]({{< relref "./instrumentation" >}}).
If you are interested in instrumentation, refer to [Tempo instrumentation](./instrumentation).

## Docker Compose

Expand All @@ -27,22 +27,22 @@ Some of the examples include:
- Trace discovery with Loki
- Basic Grafana Alloy/OpenTelemetry Setup
- Various Backends (S3/GCS/Azure)
- [K6 with Traces]({{< relref "./docker-example" >}})
- [K6 with Traces](./docker-example)
This is a great place to get started with Tempo and learn about various trace discovery flows.

## Helm

The Helm [example](https://github.com/grafana/tempo/tree/main/example/helm) shows a complete microservice based deployment.
There are monolithic mode and microservices examples.

To install Tempo on Kubernetes, use the [Deploy on Kubernetes using Helm](/docs/helm-charts/tempo-distributed/next/) procedure.
To install Tempo on Kubernetes, use the [Deploy on Kubernetes using Helm](https://grafana.com/docs/helm-charts/tempo-distributed/next/) procedure.

## Tanka

To view an example of a complete microservice-based deployment, this [Jsonnet based example](https://github.com/grafana/tempo/tree/main/example/tk) shows a complete microservice based deployment.
There are monolithic mode and microservices examples.

To learn how to set up a Tempo cluster, see [Deploy on Kubernetes with Tanka]({{< relref "../setup/tanka" >}}).
To learn how to set up a Tempo cluster, see [Deploy on Kubernetes with Tanka](../setup/tanka/).

## Introduction to Metrics, Logs and Traces example

Expand Down
Loading
Loading