Skip to main content
Version: 1.0

Sending Logs

All logs are received over OTLP/HTTP at http://<your-ip>:4318. Replace <your-ip> with the address of the machine running the stack (use localhost if it's the same machine).

Quick test with telemetrygen​

Generate synthetic logs without touching your app — useful to confirm the pipeline works end to end:

docker run --rm \
--network xplurdata_otel-net \
ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest \
logs \
--otlp-endpoint otel-collector:4318 \
--otlp-http \
--otlp-insecure \
--duration 10s \
--rate 100 \
--service my-service

Within a few seconds you should see records appear in the Web UI.

Send logs from your application​

Every OpenTelemetry SDK reads the same standard environment variables. Set these once and the SDK exports to your stack:

export OTEL_EXPORTER_OTLP_ENDPOINT="http://<your-ip>:4318"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_SERVICE_NAME="my-service"
export OTEL_LOGS_EXPORTER="otlp"

Then wire up the SDK for your language:

pip install opentelemetry-distro opentelemetry-exporter-otlp
opentelemetry-bootstrap -a install

Run your app with auto-instrumentation — logs, traces, and metrics export automatically:

opentelemetry-instrument python app.py
note

The install + run snippets above are the standard OpenTelemetry starting points. Because all SDKs honour the OTEL_* environment variables, the same endpoint configuration works for every language.