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

docs: Getting started sandbox #4045

Merged
merged 17 commits into from
Sep 11, 2024
Merged
Changes from 3 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
99 changes: 86 additions & 13 deletions docs/sources/tempo/getting-started/docker-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,26 @@ title: Quick start for Tempo
menuTitle: Quick start for Tempo
description: Use Docker to quickly view traces using K-6 and Tempo
weight: 600
killercoda:
title: Quick start for Tempo
description: Use Docker to quickly view traces using K-6 and Tempo
details:
intro:
foreground: docker-compose-update.sh
preprocessing:
substitutions:
- regexp: ../../
replacement: docs/tempo/latest/
- regexp: '{{< relref "./instrumentation" >}}'
replacement: https://grafana.com/docs/tempo/latest/getting-started/instrumentation
- regexp: '{{< relref "../setup" >}}'
replacement: https://grafana.com/docs/tempo/latest/setup
backend:
imageid: ubuntu
---

<!-- INTERACTIVE page intro.md START -->

# Quick start for Tempo

The Tempo repository provides [multiple examples](https://github.com/grafana/tempo/tree/main/example/docker-compose) to help you quickly get started using Tempo and distributed tracing data.
Expand All @@ -16,12 +34,7 @@ The Tempo examples running with Docker using docker-compose include a version of
This quick start guide uses the `local` example running Tempo as a single binary (monolithic). Any data is stored locally in the `tempo-data` folder.
To learn more, read the [local storage example README](https://github.com/grafana/tempo/blob/main/example/docker-compose/local).

## Alternative: Complete MLTP example

If you would like to use a demo with Tempo, Mimir, Loki, and Grafana, then try the [Introduction to Metrics, Logs, Traces, and Profiling in Grafana](https://github.com/grafana/intro-to-mlt).
`Intro-to-mltp` provides a self-contained environment for learning about Mimir, Loki, Tempo, and Grafana.
The project includes detailed explanations of each component and annotated configurations for a single-instance deployment.
Data from `intro-to-mltp` can also be pushed to Grafana Cloud.
<!-- INTERACTIVE ignore START -->

## Before you begin

Expand All @@ -31,6 +44,26 @@ To follow this guide, you need:
- Docker
- The docker-compose plugin

{{< admonition type="tip" >}}
Alternatively, you can try out this example in our interactive learning environment: [Quick start for Tempo](https://killercoda.com/grafana-labs/course/tempo/quick-start).

It's a fully configured environment with all the dependencies already installed.

![Interactive](/media/docs/tempo/tempo-ile.svg)

Provide feedback, report bugs, and raise issues in the [Grafana Killercoda repository](https://github.com/grafana/killercoda).
{{< /admonition >}}

<!-- INTERACTIVE ignore END -->

{{<docs/ignore>}}
> **Note**: A setup script is running in the background to install the necessary dependencies. This should take no longer than 30 seconds. Your instance will be ready to use once you `Setup complete. You may now begin the tutorial`.
{{</docs/ignore>}}

<!-- INTERACTIVE page intro.md END -->

<!-- INTERACTIVE page step1.md START -->

## Clone the Tempo repository and start Docker

1. Clone the Tempo repository:
Expand All @@ -48,7 +81,12 @@ To follow this guide, you need:
docker compose up -d
```

1. Verify that the services are running using `docker compose ps`. You should see something like:
2. Verify that the services are running.
```bash
docker compose ps
```

You should see something like:
```console
docker compose ps
NAME COMMAND SERVICE STATUS PORTS
Expand All @@ -58,16 +96,51 @@ To follow this guide, you need:
local-tempo-1 "/tempo -config.file…" tempo running 0.0.0.0:3200->3200/tcp, 0.0.0.0:4317-4318->4317-4318/tcp, 0.0.0.0:9411->9411/tcp, 0.0.0.0:14268->14268/tcp
```

1. As part of the docker compose manifest, Grafana is now accessible on port 3000. Open a browser to localhost:3000 and sign in to Grafana.
<!-- INTERACTIVE page step1.md END -->

<!-- INTERACTIVE page step2.md START -->

## Explore the traces in Grafana

As part of the docker compose manifest, Grafana is now accessible on port 3000. We can use Grafana to explore the traces generated by the k6-tracing service.

1. Open a browser and navigate to [http://localhost:3000](http://localhost:3000).

1. Once logged in, navigate to the **Explore** page, select the **Tempo** data source and select the **Search** tab. Select **Run query** to list the recent traces stored in Tempo. Select one to view the trace diagram:
<p align="center"><img src="../../setup/assets/setup-linux-run-query.png" alt="Query example"></p>

{{< figure align="center" src="../../setup/assets/setup-linux-run-query.png" alt="Query example" >}}


1. A couple of minutes after Tempo has started up successfully, select the **Service graph** tab for the Tempo data source in the **Explore** page. Select **Run query** to view a service graph, generated by Tempo’s metrics-generator.
<p align="center"><img src="../../setup/assets/setup-linux-node-graph.png" alt="Service graph sample"></p>
2. A couple of minutes after Tempo has started up successfully, select the **Service graph** tab for the Tempo data source in the **Explore** page. Select **Run query** to view a service graph, generated by Tempo’s metrics-generator.

1. To stop the services:
```
{{< figure align="center" src="../../setup/assets/setup-linux-node-graph.png" alt="Service graph sample" >}}

3. To stop the services:
```bash
docker compose down -v
```

<!-- INTERACTIVE page step2.md END -->

<!-- INTERACTIVE page finish.md START -->

## Next steps

You have successfully set up Tempo and Grafana to explore traces generated by the k6-tracing service. Wondering what to do next? Here are some ideas:

### Alternative: Complete MLTP example

If you would like to use a demo with Tempo, Mimir, Loki, and Grafana, then try the [Introduction to Metrics, Logs, Traces, and Profiling in Grafana](https://github.com/grafana/intro-to-mlt).
`Intro-to-mltp` provides a self-contained environment for learning about Mimir, Loki, Tempo, and Grafana.
The project includes detailed explanations of each component and annotated configurations for a single-instance deployment.
Data from `intro-to-mltp` can also be pushed to Grafana Cloud.

### Further reading
Here are some resources to help you learn more about Tempo:
* [Instrumenting your application]({{< relref "./instrumentation" >}})
* [Setup Guides for Tempo]({{< relref "../setup" >}})


<!-- INTERACTIVE page finish.md END -->

<!-- INTERACTIVE page START -->