Add the NxtOne SDK to your container images.
NxtOne is an SDK you install in your application — there is no NxtOne container, sidecar, or daemon to run. The SDK runs inside your service's own process and sends behavioral events straight to the NxtOne platform over HTTPS. Containerizing an instrumented service comes down to three things: install the SDK in your image, pass your API key at run time, and allow outbound HTTPS.
| Piece | Where it runs | What it does |
|---|---|---|
| NxtOne SDK | Inside your service's process, in your own image | Instruments your code in-process and batches events in memory. |
| NxtOne platform | Hosted by NxtOne | Receives events from the SDK over HTTPS. Nothing extra runs on your host. |
Only services that run your own code need the SDK. Databases, caches, and other off-the-shelf images stay exactly as they are.
ENV overrides it. Pass it at run time with --env-file, Compose env_file, or your orchestrator's secret store.Install the SDK as a normal dependency of your application, then build the image the way you already do. The image needs nothing NxtOne-specific beyond that dependency.
Add the starter to your build. It attaches the SDK when the application starts, so the Dockerfile needs no -javaagent flag:
Outside Spring Boot, call Nxtone.attach() as the first line of main(). In a shaded uber-JAR, also set NXTONE_AGENT_JAR to the path of the SDK JAR.
The SDK is activated in your code: decorate the function that starts your server (for FastAPI, the one that calls uvicorn.run) with @nxtone.NxtOneAgent, and run that file. See Python (FastAPI). Requires Python 3.10+.
--import @nxtone/agent/register loads the SDK before your app. Alternatively, call await nxtone.init() at the top of your entry file and start Node normally. Requires Node.js 20.6+.
There is no NxtOne service to add. Each instrumented service gets the API key and its own NXTONE_PROJECT_ID, which is what lets NxtOne stitch a single request into a cross-service execution flow:
Compose reads NXTONE_API_KEY from a .env file next to docker-compose.yml, so the value never enters the YAML or the image.
| Variable | Required | Description |
|---|---|---|
NXTONE_API_KEY | Yes | Authenticates the SDK with the platform. Without it the SDK does nothing and your service runs unobserved — it never fails your app. |
NXTONE_PROJECT_ID | Recommended | Groups execution flows in the UI. Set it explicitly per service — the fallback is not service-specific, so a stack can collapse into a single project. |
NXTONE_EXCLUDE | No | Packages or paths to leave uninstrumented. See Filtering. |
See Environment Variables and Filtering for the full reference.
This only matters if your containers run with a read-only root filesystem. The Node.js SDK writes nothing to disk. The Java SDK copies its JAR into the JVM's temp directory (/tmp by default) at startup — if it can't, it logs nxtone: agent attach failed and the service runs uninstrumented. The Python SDK creates a nxtone/ directory under the system temp directory at startup, and writes batches there only when its in-memory queue is full or a send fails. For Java and Python services, mount a tmpfs at /tmp:
The SDK batches events in memory and flushes them when your process exits. A container killed before that flush loses its last events, so:
CMD/ENTRYPOINT (a JSON array) so your app is PID 1 and receives SIGTERM directly.node as shown above rather than npx nxtone run — the launcher does not forward SIGTERM to your app.NXTONE_SHUTDOWN_TIMEOUT) — set stop_grace_period to match, or lower the timeout.Because the SDK runs inside your process, its overhead counts against your service's own container limits — memory for the event queue, CPU for serialization. Limits sized tightly against an uninstrumented service are the usual cause of post-rollout OOM kills.
docker stats under representative load, and size from what you observe. Trimming noisy packages with exclusions is usually more effective than raising limits.The SDK logs to stderr, so its startup lines appear in your service's container logs:
| Runtime | What to look for |
|---|---|
| Java | nxtone: agent attached, then nxtone: application ready |
| Node.js | NXTONE_SESSION_ID=… |
| Any | A hint that the API key is missing means the SDK is running as a no-op — check the environment the container actually received. |
If nothing appears, work through Troubleshooting.
The SDK only makes outbound connections; it opens no ports. In locked-down environments, allow HTTPS (443) from your service containers to the NxtOne API (api.nxtone.ai and www.api.nxtone.ai) and to Amazon S3, which the SDK uses for large payloads.