# Uptrace stack for ${service_name}

Generated by `svc-infra obs uptrace init`.

## What got created

- `observability/uptrace/compose.yml` — self-hosted Uptrace (UI + OTLP).
- `.env.uptrace` — **app-side env** you should set on your platform.

## Run locally

```bash
docker compose -f observability/uptrace/compose.yml up -d
# UI → http://localhost:14318
# OTLP gRPC → 0.0.0.0:4317

## Configure your app

Set these on your deployed application:
OBS_MODE=${mode}
OTEL_SERVICE_NAME=${service_name}
OTEL_EXPORTER_OTLP_ENDPOINT=${otlp_endpoint}
OTEL_EXPORTER_PROTOCOL=${protocol}
${dsn_line}

Your app already calls add_observability(...), so no code changes are required.

## Deploying Uptrace on a server/host

Copy this folder to a host (or use any container platform) and run:
```bash
docker compose -f observability/uptrace/compose.yml up -d
```

Expose port 14318 via your platform to access the UI.

## Security

Use Uptrace basic auth above, or protect the UI behind your platform’s auth/proxy.
