OneXMonitor parameters
| Parameter | Type | Description |
|---|---|---|
endpoint | string | Ingestion base URL. Determines which platform environment receives your logs (sandbox, development, production). Fetch environment-specific endpoints from the OneX Observability Dashboard. |
api_key | string | API key for authentication (from the same dashboard). |
enable_logging | bool | When true, enables SDK logging at INFO level (framework detection, signal export, etc.). Use for local debugging. Default: false. |
sample_rate | float | Fraction of requests to export (0.0–1.0). 1.0 = 100%, 0.1 = 10%. Reduces volume in high-traffic production. Default: 1.0. |
max_requests_per_minute | int | None | Cap on batch export requests per minute to avoid overloading the platform. None = no cap. Default: None. |
Config options
| Key | Type | Default | Description |
|---|---|---|---|
hidden_state_sample_tokens | int | 4 | Number of tokens sampled per hidden-state payload. |
hidden_state_sample_features | int | 32 | Number of features sampled per token. |
hidden_state_precision | int | 6 | Decimal precision for rounded tensor samples (use -1 to disable rounding). |
capture_full_hidden_state | bool | false | Set true to include the entire hidden-state tensor (use cautiously). |
payload_sample_items | int | 5 | Max items serialized per list/dict when exporting request payloads. |
payload_tensor_sample | int | 32 | Flat element sample size for tensor summaries in request payloads. |
payload_max_depth | int | 2 | Maximum depth for nested request payload serialization. |
request_metadata | dict | {} | Extra metadata appended to every request payload/response event. |
request_payload_endpoint | string | derived | Override for the payload ingestion endpoint (defaults to /api/requests/payload). |
request_response_endpoint | string | derived | Override for the response ingestion endpoint (defaults to /api/requests/response). |
capture_request_payload | bool | true | When false, request payloads (model inputs and raw context) are not sent to the platform. Neural signals still go to /api/signals/batch. |
capture_response_payload | bool | true | When false, response payloads (model outputs and application responses) are not sent. Neural signals still go to /api/signals/batch. |
enable_logging | bool | false | When true, enables SDK logging at INFO level for debugging. Can also be passed as a top-level parameter to OneXMonitor. |
sample_rate | float | 1.0 | Fraction of requests to export (0.0–1.0). Per-request sampling; can also be passed as a top-level parameter. |
max_requests_per_minute | int | None | None | Cap on batch export requests per minute. Can also be passed as a top-level parameter. |
capture_logits | bool | false | When true, model logits are extracted from the forward output and included in the response payload (shape + sample). For Uncertainty, Calibration, and Confidence assessments. |
capture_probabilities | bool | false | When true, probabilities (softmax of logits) are computed and included in the response payload (shape + sample). Requires logits to be present in the model output. |
logits_sample_size | int | 64 | Max number of values to include in the logits/probabilities sample (flattened). Limits payload size. |
Sampling and throughput control
- Sample rate: When
sample_rateis less than1.0, the SDK exports only a fraction of requests. The decision is made once per request (byrequest_id), so either all signals for a request are exported or none. Use this in high-traffic production to reduce volume while keeping representative coverage (e.g.sample_rate=0.1for 10% of requests). - Max requests per minute: When set, the exporter limits how many batch HTTP requests it sends to the platform per 60-second sliding window. Batches are sent as soon as possible under this cap. Use this to avoid overloading the ingestion API when many models or processes export concurrently.
Logits and probabilities capture
For Uncertainty, Calibration, and Confidence assessments, the platform can use model logits and/or probabilities. By default they are not captured (privacy and payload size).- capture_logits: When
true, the SDK extracts thelogitstensor from the model forward output (e.g. HuggingFaceCausalLMOutputWithPast.logits) and adds alogitsfield to the response payload withshape,sample(first N values), andnumel. - capture_probabilities: When
true, the SDK computessoftmax(logits)and adds aprobabilitiesfield with the same structure. Requires the model output to expose logits (e.g..logitsattribute or first element of a tuple). - logits_sample_size: Caps how many values are included in the sample (default 64). Use a higher value for small classification heads; keep lower for large vocabularies.
output field in the response is serialized without the raw logits tensor so you avoid duplicating data and control size via the sampled fields.
Example:
