OTel makes it easy! Here's how.
You will need a laptop or VM with the following software installed (use the links for installation instructions):
Verify your installations by running these commands in your terminal:
git --version(expected output:2.32.1or higher)docker --version(expected output:20.10.12or higher)docker-compose --version(expected output:1.29.2or higher)
You will need to clone this repository:
git clone https://github.com/grafana/opentelemetry-workshop.gitYour laptop or VM will need outbound public internet access to these hostnames, protocols, and ports:
| Hostname | Protocol | Port |
|---|---|---|
| *.docker.com | HTTPS | 443 |
| *.docker.io | HTTPS | 443 |
| *.github.com | HTTPS | 443 |
| *.grafana.com | HTTPS | 443 |
| *.grafana.net | HTTPS | 443 |
You will need a Grafana Cloud stack using the free tier.
- Register an account: https://grafana.com/auth/sign-up/create-user
- Acknowledge the confirmation email.
- Sign into Grafana Cloud: https://grafana.com/auth/sign-in/
- On the left navigation menu, click
+ Add Stackand follow the prompts. - Your stack will be ready in less than a minute.
- Sign into Grafana Cloud: https://grafana.com/auth/sign-in/
- On the left navigation menu, click
Access Policiesand then clickCreate access policy. - Give it a name, select
(all stacks)as your realm, and select the checkboxes underWritefor themetrics,logs, andtracesresources. - Click
Create - Click
Add tokenunder your newly created access policy. - Give your token a name and then click
Create. - Click
Copy to Clipboardto copy the token. You won't be able to see it again. If you lose it, you can create a new one. - Save your token in your copy of the
./envfile in this repo as the value ofGRAFANA_CLOUD_TOKEN.
Example:
# Grafana Cloud
GRAFANA_CLOUD_TOKEN=paste_your_token_here
...Once you have provisioned a stack, you will need to update your local copy of the ./env file from this repo with the following values.
- Sign into Grafana Cloud: https://grafana.com/auth/sign-in/
- On the left navigation menu, click the link to your stack.
- Click the
Detailsbuttons under "Grafana," "Loki," "Prometheus," and "Tempo" to obtain the following values for your./envfile:
| Environment Variable | Instructions |
|---|---|
GRAFANA_CLOUD_TOKEN |
Completed in Section 2.3. |
GRAFANA_CLOUD_INSTANCE_ID |
Under Grafana > Details, copy the value of "Instance ID". Example: 123456 |
GRAFANA_CLOUD_REGION |
Under Grafana > Details, copy the value of "Zone" without the parentheses. Example: prod-us-central-0 |
GRAFANA_STACK_LOKI_URL |
Under Loki > Details, copy the value of "URL" and append it with /loki/api/v1/pushExample: https://logs-prod-017.grafana.net/loki/api/v1/push |
GRAFANA_STACK_LOKI_USERNAME |
Under Loki > Details, copy the value of "User". Example: 123456 |
GRAFANA_STACK_PROMETHEUS_URL |
Under Prometheus > Details, copy the value of "Remote Write Endpoint". Example: https://prometheus-us-central1.grafana.net/api/prom/push |
GRAFANA_STACK_PROMETHEUS_USERNAME |
Under Prometheus > Details, copy the value of "Username / Instance ID". Example: 123456 |
GRAFANA_STACK_TEMPO_URL |
Under Tempo > Details, copy the value of "URL" and replace /tempo with :443Example: https://tempo-us-central1.grafana.net:443 |
GRAFANA_STACK_TEMPO_USERNAME |
Under Tempo > Details, copy the value of "User". Example: 123456 |