# Quickstart

> Send your first trace, log and metric in under 5 minutes

Rocketgraph speaks plain OTLP over HTTP. If your app already emits OpenTelemetry, this is
two environment variables and a restart.

## 1. Get your endpoint and key

Both are shown on the **Integrations** page of your Rocketgraph dashboard, already filled
into every snippet.

- **Endpoint** — the OTLP ingress for your deployment, e.g. `https://ingress.rocketlog.io`.
  Self-hosted installs set this with `OTLP_ENDPOINT`, so yours may differ. The Integrations
  page always shows the right one.
- **API key** — a bearer token of the form `rg_live_…`.

## 2. Point your app at it

```bash
export OTEL_SERVICE_NAME="my-service"
export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingress.rocketlog.io"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer rg_live_xxxxxx"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_LOGS_EXPORTER="otlp"
```

> **Warning:** `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf` is not optional. Most SDKs default to gRPC,
  and the ingress speaks HTTP — get this wrong and your app starts cleanly, reports no
  error, and sends nothing. It is the single most common failed first install.

Give the endpoint as a **base URL**, not a signal path. The SDK appends `/v1/traces`,
`/v1/logs` and `/v1/metrics` itself.

## 3. Run it

```bash Node.js
npm install @opentelemetry/auto-instrumentations-node
export NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register"
node app.js
```

```bash Python
pip install opentelemetry-distro opentelemetry-exporter-otlp
opentelemetry-bootstrap -a install
opentelemetry-instrument python app.py
```

```bash Java
curl -sLo otel.jar https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
java -javaagent:./otel.jar -jar my-app.jar
```

```bash Go
go get go.opentelemetry.io/otel go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
# Go has no agent — see the Go guide for the ~20 lines of setup.
```

## 4. Check it arrived

Send one span by hand first. This separates an ingest problem from an instrumentation
problem in about a second:

```bash
curl -i -X POST https://ingress.rocketlog.io/v1/traces \
  -H "Authorization: Bearer rg_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"resourceSpans":[]}'
```

A 2xx means the endpoint and key are good. `401` means the key is wrong — check that the
header uses `=` and not `:` inside `OTEL_EXPORTER_OTLP_HEADERS`. `404` means the path is
wrong.

Then exercise your app and open **Logs** or **Traces** in the dashboard. Data normally
appears within a few seconds.

## Next steps

  **Watchtower** — Go from a time range to the request that explains it.
  
  **Kubernetes** — Run a collector, or fan out from one you already have.
  
  **AWS** — ECS, Fargate, Lambda and EC2.
  
  **Alerts** — Alert rules over the same store.
