Skip to content

Diagnostics

Both SDKs stay quiet by default. When something is not working, this is how you make them say why.

Python

The SDK logs under the coalex logger and — deliberately — never configures logging for you. A library that calls basicConfig takes over your application's log configuration, which is not its to take. So the SDK attaches a NullHandler and leaves the rest to you.

Turn it on:

import logging

logging.basicConfig(level=logging.INFO)          # your application's own setup
logging.getLogger("coalex").setLevel(logging.DEBUG)

What that surfaces:

Logger What you see
coalex.context which agent id a span was attributed to, and where it came from
coalex.auto_instrument which frameworks were instrumented, and which were found but could not be
coalex.safe_exporter span export failures — the first few, then a heartbeat
coalex.inventory whether the agent's self-declaration was accepted, and the server's reason if not

Without raising the level you still get warnings and errors, but only through Python's lastResort handler if your application has none of its own — which prints without a timestamp, level or logger name, and cannot be filtered.

TypeScript

The SDK writes to console by default. Pass your own logger to route its diagnostics into your structured logging, or null to silence them entirely:

import { register } from "@coalex-ai/sdk"

register({
  apiKey: process.env.COALEX_API_KEY,
  logger: {
    debug: (m) => myLogger.debug({ sdk: "coalex" }, m),
    warn: (m) => myLogger.warn({ sdk: "coalex" }, m),
    error: (m) => myLogger.error({ sdk: "coalex" }, m),
  },
})

Only warn is required. Every message is prefixed [coalex].

What you will never see in a log line

No API key, proxy token or upstream credential reaches a log line or an exception message in either SDK. Raising the level does not change that — it is a property of what is written, not of what is filtered.