# SDK examples

Each app emits a synthetic error, a structured log and a trace with a child span.
Dependencies are pinned. Set `SENTRY_DSN` in your application's environment using
README's private Railway DSN. Never commit your real DSN. Run in the same Railway
environment as the template, or against a locally reachable Sentry instance.

```sh
# Node
cd examples/node
npm install --ignore-scripts --no-package-lock
npm start

# Python, from the repository root
python3 -m venv .venv
. .venv/bin/activate
pip install -r examples/python/requirements.txt
python examples/python/app.py

# Go, from the repository root
cd examples/go
go run .
```

Select the application's project and environment in Sentry. Look for the
`Railway error example` in Issues, `Railway structured log` in Logs and `railway-example`
in Traces. Open the trace to confirm the child span is its child.
Full sampling is a demonstration setting; choose sampling for your workload.

`python scripts/test_examples.py` tests all apps locally using the real SDKs and
an HTTP envelope receiver. It checks error text, log text and the parent/child
span relationship. This proves SDK output, not indexing in a Sentry deployment.
See [validation](../VALIDATION.md) for the exact test record.
