Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.16 KB

README.md

File metadata and controls

41 lines (32 loc) · 1.16 KB

OpenTelemetry Python Basics

Just a basic client/server for playing with OpenTelemetry in Python.

Handy links:

Define your Lightstep Access Token prior to running:

export LS_ACCESS_TOKEN=my-access-token-etc

Installation

git clone https://github.com/tedsuo/otel-python-basics.git && cd otel-python-basics
mkdir new_virtual_environment
python3 -m venv new_virtual_environment
source new_virtual_environment/bin/activate
pip install -r requirements.txt

Run

export LS_ACCESS_TOKEN=my-access-token-etc
export LS_SERVICE_NAME=hello-server
export OTEL_PYTHON_TRACER_PROVIDER=sdk_tracer_provider
opentelemetry-instrument python3 server.py
export LS_ACCESS_TOKEN=my-access-token-etc
export LS_SERVICE_NAME=hello-client
export OTEL_PYTHON_TRACER_PROVIDER=sdk_tracer_provider
opentelemetry-instrument python3 client.py