Skip to content

cisco-emea-cx-cto/opentelemetry-workshop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenTelemetry Workshop

OTel makes it easy! Here's how.

Prerequisites

1. Prepare your local environment

1.1. Install dependencies

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.1 or higher)
  • docker --version (expected output: 20.10.12 or higher)
  • docker-compose --version (expected output: 1.29.2 or higher)

1.2. Clone this repo

You will need to clone this repository:

git clone https://github.com/grafana/opentelemetry-workshop.git

1.3. Confirm internet access

Your 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

2. Prepare Grafana Cloud

You will need a Grafana Cloud stack using the free tier.

2.1. Register an account

  1. Register an account: https://grafana.com/auth/sign-up/create-user
  2. Acknowledge the confirmation email.

2.2. Provision a stack

  1. Sign into Grafana Cloud: https://grafana.com/auth/sign-in/
  2. On the left navigation menu, click + Add Stack and follow the prompts.
  3. Your stack will be ready in less than a minute.

2.3. Create a token

  1. Sign into Grafana Cloud: https://grafana.com/auth/sign-in/
  2. On the left navigation menu, click Access Policies and then click Create access policy.
  3. Give it a name, select (all stacks) as your realm, and select the checkboxes under Write for the metrics, logs, and traces resources.
  4. Click Create
  5. Click Add token under your newly created access policy.
  6. Give your token a name and then click Create.
  7. Click Copy to Clipboard to copy the token. You won't be able to see it again. If you lose it, you can create a new one.
  8. Save your token in your copy of the ./env file in this repo as the value of GRAFANA_CLOUD_TOKEN.

Example:

# Grafana Cloud
GRAFANA_CLOUD_TOKEN=paste_your_token_here
...

2.4. Obtain environment variables

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.

  1. Sign into Grafana Cloud: https://grafana.com/auth/sign-in/
  2. On the left navigation menu, click the link to your stack.
  3. Click the Details buttons under "Grafana," "Loki," "Prometheus," and "Tempo" to obtain the following values for your ./env file:
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/push

Example: 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 :443

Example: https://tempo-us-central1.grafana.net:443
GRAFANA_STACK_TEMPO_USERNAME Under Tempo > Details, copy the value of "User".

Example: 123456

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 58.7%
  • Dockerfile 23.4%
  • Java 17.9%