lgtm-observe
Observability CLI for agentic workflows and event-driven systems.
Trace requests across distributed services, debug Kafka consumers, and correlate logs with traces - all from your terminal.
Built for teams running AI agents, Kafka pipelines, and microservices on the LGTM stack (Loki, Grafana, Tempo, Prometheus).
Why?
When debugging agentic workflows, you need to:
- Trace a request across multiple services (agent → tool → API → database)
- Check Kafka lag to see if consumers are keeping up
- Correlate logs with traces to find where things went wrong
- Do it fast without clicking through Grafana dashboards
Existing tools are siloed:
logcli- Loki onlypromtool- Prometheus onlytempo-cli- Tempo only
lgtm-observe: All of them + Kafka in one tool. Optimized for the workflow of debugging distributed systems.
Install
# Core (logs, traces, metrics)
pip install adjoint-lgtm-observe
# With Kafka support
pip install adjoint-lgtm-observe[kafka]
# Development
pip install -e ".[dev,kafka]"
Quick Start
# Configure endpoints (pick one method)
# Option 1: Environment variables
export LOKI_URL=http://localhost:3100
export TEMPO_URL=http://localhost:3200
export PROMETHEUS_URL=http://localhost:9090
export KAFKA_BOOTSTRAP=localhost:9093
# Option 2: Config file
cat > ~/.lgtm-observe.json << 'EOF'
{
"loki_url": "http://localhost:3100",
"tempo_url": "http://localhost:3200",
"prometheus_url": "http://localhost:9090",
"kafka_bootstrap": "localhost:9093"
}
EOF
# Check status
lgtm-observe status
# Query logs
lgtm-observe logs
lgtm-observe logs --service myapp --limit 50
# Get traces
lgtm-observe traces --service myapp
lgtm-observe trace abc123def456
# Query metrics
lgtm-observe metrics 'up'
lgtm-observe metrics 'rate(http_requests_total[5m])'
# Kafka state
lgtm-observe kafka topics
lgtm-observe kafka consumers
lgtm-observe kafka lag
Commands
| Command | Description |
|---|---|
status |
Health check all systems |
config |
Show current configuration |
logs |
Query logs from Loki |
trace <id> |
Get a specific trace |
traces |
Search recent traces |
metrics <query> |
Query Prometheus |
kafka topics |
List topics with message counts |
kafka consumers |
List consumer groups |
kafka lag |
Show consumer lag |
Development
# Using uv (recommended)
uv sync --all-extras --dev
uv run pytest
uv run ruff check src/
# Or with pip
pip install -e ".[dev,kafka]"
pytest
ruff check src/
Publishing
This package uses uv and PyPI Trusted Publishers for secure, token-free releases.
- Create a GitHub release with a version tag (e.g.,
v0.1.0) - GitHub Actions automatically builds and publishes to PyPI
First-time PyPI setup
Add a Trusted Publisher on PyPI:
- Go to https://pypi.org/manage/project/adjoint-lgtm-observe/settings/publishing/
- Add GitHub as trusted publisher:
- Owner:
Adjoint-uk - Repository:
lgtm-observe - Workflow:
publish.yml - Environment:
pypi
- Owner:
License
Apache 2.0 - Adjoint Ltd
Metadata
Release files for adjoint-lgtm-observe 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| adjoint_lgtm_observe-0.1.0.tar.gz | 31.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adjoint_lgtm_observe-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.6 kB
Release files / adjoint_lgtm_observe-0.1.0.tar.gz
| Download URL | adjoint_lgtm_observe-0.1.0.tar.gz |
|---|---|
| Size | 31.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cfc455e83b234e29053eac21eee0de42d24961194417701f062ee68d9632890
|
|
BLAKE2b-256 checksum How to use checksums |
5d14445e3ef25d27196b0b198f5abe055963c10a0a34a2fcadf0607cb76eae1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / adjoint_lgtm_observe-0.1.0-py3-none-any.whl
| Download URL | adjoint_lgtm_observe-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
751960b420d48e8f9ff89dab41b39dc1e8dd7c17685b8872eb8fd445256dea0f
|
|
BLAKE2b-256 checksum How to use checksums |
ee87aac697fb106fed11a7bcd69c08eebca6451a0461e54d43d6cb399f9f0e8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|