Skip to content

Example code and resources for working with OpenTelemetry, provided by Lightstep

Notifications You must be signed in to change notification settings

DTPierreGutierrez/opentelemetry-examples

 
 

Repository files navigation

Lightstep OpenTelemetry Examples

This repository contains example code and resources for configuring a variety of languages with OpenTelemetry. The directory structure for each language looks like this:

go
├── launcher - these applications are using the opentelemetry launcher, a config layer built
               on top of opentelemetry
├── opentelemetry - these applications are configured and instrumented using opentelemetry
                    directly
└── opentracing - these applications are using the OpenTracing bridge available in
                  OpenTelemetry. The code is instrumented using OpenTracing.

Running examples

All the applications in this repository can be launched using docker-compose. In order to send data to Lightstep, you can update the configuration using the steps below before starting docker-compose:

git clone https://github.com/lightstep/opentelemetry-examples && cd opentelemetry-examples

# copy the example environment variable file
# and update the access token
cp ./config/example.env .env
sed -i '' 's/<ACCESS TOKEN>/YOUR TOKEN HERE/' .env
# if using the AWS OpenTelemetry Distro, use `example-aws-collector-config.yaml`
cp ./config/example-collector-config.yaml ./config/collector-config.yaml
sed -i '' 's/<ACCESS TOKEN>/YOUR TOKEN HERE/' ./config/collector-config.yaml

docker-compose up

The following client/server applications use different mechanism for sending data to Lightstep. The following examples are configured in the docker-compose.yml file:

name description
go-opentracing client/server example instrumented via lightstep-tracer-go
go-opentelemetry client/server example instrumented via OpenTelemetry and the OTLP exporter
go-launcher client/server example instrumented via OpenTelemetry and the Launcher for configuration
py-collector client/server example instrumented via OpenTelemetry and the OTLP exporter combined with the OpenTelemetry Collector
py-opentelemetry client/server example instrumented via OpenTelemetry and the OTLP exporter
py-launcher client/server example instrumented via OpenTelemetry and the Launcher for configuration
js-lstrace client/server example instrumented via ls-trace-js
java client/server example instrumented via special agent
java-otlp client/server example instrumented via OpenTelemetry and the OTLP exporter
java-launcher client/server example instrumented via OpenTelemetry and the Launcher for configuration
js-ot-shim client/server example instrumented via OpenTelemetry and JS Launcher with OpenTracing

About

Example code and resources for working with OpenTelemetry, provided by Lightstep

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 66.7%
  • Java 14.5%
  • Python 6.3%
  • Go 4.5%
  • HTML 2.1%
  • Dockerfile 1.9%
  • Other 4.0%