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,
)| Kwarg | Env twin | Default | Meaning |
|---|---|---|---|
api_key | RADICAS_API_KEY | none (LOCAL mode) | Ingest key. Presence switches the SDK to ONLINE mode: Bearer auth, online endpoint default, no client-side tenant. |
endpoint | RADICAS_ENDPOINT (fallback: OTEL_EXPORTER_OTLP_ENDPOINT) | https://ingest.radicas.io with a key, http://localhost:4317 without | OTLP ingestion endpoint. |
service | RADICAS_SERVICE (fallback: OTEL_SERVICE_NAME) | radicas-agent | Becomes the service.name resource attribute — your agent's identity in the fleet views. |
feature | RADICAS_FEATURE (legacy fallback: FEATURE_NAME) | default | Default feature tag stamped as radicas.feature on every agent invocation. Override per request with radicas.feature(...) — see feature tagging. |
source | RADICAS_SOURCE | agent | Origin marker (radicas.source resource attribute) — distinguishes real traffic from synthetic emitters. |
instrument | RADICAS_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. |
protocol | RADICAS_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. |
validate | RADICAS_VALIDATE (true / false / strict) | True | Connectivity probe at init: True warns once on failure and continues; "strict" raises RadicasConnectionError; False skips. |
capture_content | RADICAS_CAPTURE_CONTENT (fallback: OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT) | False | Opt-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-lab | LOCAL 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:
| Variable | Set by the SDK to |
|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT | the resolved endpoint |
OTEL_EXPORTER_OTLP_PROTOCOL | the resolved protocol |
OTEL_EXPORTER_OTLP_HEADERS | authorization=Bearer ... (ONLINE mode only; untouched in LOCAL mode) |
OTEL_SERVICE_NAME | the resolved service |
FEATURE_NAME | the resolved feature (legacy compatibility with radicas_otel) |
RADICAS_SOURCE | the resolved source |
OTEL_SEMCONV_STABILITY_OPT_IN | gen_ai_latest_experimental (appended if you already set other opt-ins) — required for canonical gen_ai.* attribute names |
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT | EVENT_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