bcgov / bcgov/traction

Observability: Local development stack

Open
#2,013 1 comment 0 reactions 0 assignees View on GitHub
pinned
Dominant language
TypeScript
Stars
62
Forks
59
Avg merge
1d 11h
Merged PRs (30d)
5

Description

## Description

Add the `grafana/otel-lgtm` observability stack to the local docker-compose environment so developers can validate instrumentation locally before deploying to OpenShift.

## Context

Both `tenant-ui` and `traction-agent` run as compose services in `scripts/docker-compose.yml` on a shared network, so `http://lgtm:4318` is the correct endpoint for both. The `traction_innkeeper` plugin runs inside the ACA-Py process — no separate container.

## Requirements

- Add `grafana/otel-lgtm` service to `scripts/docker-compose.yml` on the same network (ports `3000:3000`, `4317:4317`, `4318:4318`)
- Add to the `tenant-ui` service environment:
- `OTEL_EXPORTER_OTLP_ENDPOINT=http://lgtm:4318`
- `OTEL_SERVICE_NAME=traction-tenant-ui`
- `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf`
- `OTEL_TRACES_EXPORTER=otlp`
- `OTEL_METRICS_EXPORTER=otlp`
- Add to the `traction-agent` service environment:
- `OTEL_EXPORTER_OTLP_ENDPOINT=http://lgtm:4318`
- `OTEL_SERVICE_NAME=traction-agent`
- `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf`
- `OTEL_TRACES_EXPORTER=otlp`
- `OTEL_METRICS_EXPORTER=otlp`
- `OTEL_PYTHON_LOG_CORRELATION=true`
- Update README or CONTRIBUTING with local observability instructions

## Acceptance Criteria

- [ ] `docker compose -f scripts/docker-compose.yml up` starts the LGTM stack alongside both components
- [ ] Grafana accessible at `http://localhost:3000`
- [ ] Traces from both tenant-ui and the ACA-Py agent visible in Tempo after instrumentation is added
- [ ] Developer docs updated

Contributor guide

Open the contributing guide

Research direction

Start with scripts/docker-compose.yml and inspect the tenant-ui and traction-agent services and their shared network. Run docker compose -f scripts/docker-compose.yml up, verify Grafana at http://localhost:3000 and the LGTM service endpoints, then update README or CONTRIBUTING with the local observability instructions. Done means the stack starts alongside both components and the required environment settings and documentation are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, grafana, typescript
Domain
devops, documentation, infrastructure, observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.