Radicas Docs
Python SDK

Configuration

Full reference for radicas.init() — every kwarg, its RADICAS_* environment twin, defaults, precedence, and the underlying OTEL_* contract.

Precedence

For every setting: explicit kwarg → RADICAS_* env var → (where one exists) the underlying OTEL_* env var → default. Kwargs win over the environment, so code that passes them behaves the same everywhere; pure-env deployments (12-factor, the onboarding snippet) need no kwargs at all.

radicas.init() reference

radicas.init(
    api_key="rad_...",
    endpoint="https://ingest.radicas.io",
    service="pricing-agent",
    feature="flight-pricing",
    source="agent",
    instrument="auto",
    protocol="http/protobuf",
    validate=True,
    capture_content=False,
)
KwargEnv twinDefaultMeaning
api_keyRADICAS_API_KEYnone (LOCAL mode)Ingest key. Presence switches the SDK to ONLINE mode: Bearer auth, online endpoint default, no client-side tenant.
endpointRADICAS_ENDPOINT (fallback: OTEL_EXPORTER_OTLP_ENDPOINT)https://ingest.radicas.io with a key, http://localhost:4317 withoutOTLP ingestion endpoint.
serviceRADICAS_SERVICE (fallback: OTEL_SERVICE_NAME)radicas-agentBecomes the service.name resource attribute — your agent's identity in the fleet views.
featureRADICAS_FEATURE (legacy fallback: FEATURE_NAME)defaultDefault feature tag stamped as radicas.feature on every agent invocation. Override per request with radicas.feature(...) — see feature tagging.
sourceRADICAS_SOURCEagentOrigin marker (radicas.source resource attribute) — distinguishes real traffic from synthetic emitters.
instrumentRADICAS_INSTRUMENT (comma-separated)auto"auto" = activate every detected framework; "none" = transport only; or a list of ids, e.g. ["adk", "langchain"]. Unknown ids raise with the list of known ids.
protocolRADICAS_PROTOCOL (fallback: OTEL_EXPORTER_OTLP_PROTOCOL)grpc locally, http/protobuf online (auto-detected from the endpoint: https or port 4318 imply http)OTLP transport: grpc, http/protobuf, http/json.
validateRADICAS_VALIDATE (true / false / strict)TrueConnectivity probe at init: True warns once on failure and continues; "strict" raises RadicasConnectionError; False skips.
capture_contentRADICAS_CAPTURE_CONTENT (fallback: OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT)FalseOpt-in prompt/response capture on the logs signal (EVENT_ONLY). Off by default — content never leaves your process unless you turn it on.
RADICAS_TENANT_ID (legacy fallback: TENANT_ID)radicas-labLOCAL mode only. Stamped as the radicas.tenant_id resource attribute for the lab shim. Ignored in ONLINE mode — see authentication.

init() is idempotent: a second call logs a warning and does nothing. It registers radicas.shutdown via atexit; call it yourself at the end of bounded runs for a deterministic flush.

The underlying OTEL_* contract (power users)

init() writes its resolved values onto the standard OpenTelemetry environment, so anything else in your process that follows OTel conventions sees a consistent picture. This is the same contract the Radicas connection docs define — you can drive it directly and skip the RADICAS_* layer entirely:

VariableSet by the SDK to
OTEL_EXPORTER_OTLP_ENDPOINTthe resolved endpoint
OTEL_EXPORTER_OTLP_PROTOCOLthe resolved protocol
OTEL_EXPORTER_OTLP_HEADERSauthorization=Bearer ... (ONLINE mode only; untouched in LOCAL mode)
OTEL_SERVICE_NAMEthe resolved service
FEATURE_NAMEthe resolved feature (legacy compatibility with radicas_otel)
RADICAS_SOURCEthe resolved source
OTEL_SEMCONV_STABILITY_OPT_INgen_ai_latest_experimental (appended if you already set other opt-ins) — required for canonical gen_ai.* attribute names
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENTEVENT_ONLY, only when content capture is enabled

Additional knobs honored from the environment: METRIC_EXPORT_INTERVAL_SECONDS (metric export period, default 10s) and OTEL_RESOURCE_ATTRIBUTES (merged into the resource by the OTel SDK).

Content capture (opt-in)

When enabled, frameworks that support it emit prompts/responses as consolidated gen_ai.client.inference.operation.details events on the logs signal (never as span attributes), kept out of the product cost views by design. Enable only when you need conversation-level debugging:

radicas.init(capture_content=True)          # or RADICAS_CAPTURE_CONTENT=true

On this page