v1adkost / nomad-open-telemetry-getting-started

OpenTelemetry getting started guides on Nomad

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Started with OpenTelemetry on HashiCorp Nomad

This repository contains reference job files to run the OpenTelemetry collector in different deployment scenarios, as described in the Getting Started guide.

These job files are provided as reference only, and are not designed for production use.

Deployment

From the official documentation:

The OpenTelemetry Collector consists of a single binary and two primary deployment methods:

  • Agent: A Collector instance running with the application or on the same host as the application (e.g. binary, sidecar, or daemonset).
  • Gateway: One or more Collector instances running as a standalone service (e.g. container or deployment) typically per cluster, datacenter or region.

To run the job files you will need access to a Nomad cluster running version 1.3.0+. You can start a local dev agent for Nomad by downloading the nomad binary and running the following command:

sudo nomad agent -dev -bind=0.0.0.0 -network-interface='{{ GetPrivateInterfaces | attr "name" }}'

Gateway

The OpenTelemetry Collector can run as a gateway by registering a service job.

nomad run https://raw.githubusercontent.com/hashicorp/nomad-open-telemetry-getting-started/main/examples/nomad/otel-collector.nomad

Agent

The OpenTelemetry Collector can run as an agent by registering a system job.

It connects to the gateway deployed in the previous section as an OTLP exporter, so make sure the gateway job is running as well.

nomad run https://raw.githubusercontent.com/hashicorp/nomad-open-telemetry-getting-started/main/examples/nomad/otel-agent.nomad

Demo

The demo job deploys the OpenTelemetry Collector as agent and gateway, load generators, and the Jaeger, Zipkin and Prometheus back-ends.

nomad run https://raw.githubusercontent.com/hashicorp/nomad-open-telemetry-getting-started/main/examples/nomad/otel-demo.nomad

The following services are available:

  • Jaeger: http://<YOUR_IP>:16686
  • Zipkin: http://<YOUR_IP>:9411
  • Prometheus: http://<YOUR_IP>:9090

Community Resources

About

OpenTelemetry getting started guides on Nomad

License:Mozilla Public License 2.0