# config

Python API: `luxonis_ml.telemetry.config`

## Classes

### TelemetryConfig

Configuration for telemetry collection.

#### Methods

##### from_environ

```python
def from_environ(defaults: TelemetryDefaults | None = None) -> TelemetryConfig:
```

Build a config from environment variables.

Reads the `LUXONIS_TELEMETRY_*` settings and returns a fully populated `TelemetryConfig` instance. The
[luxonis_ml.telemetry](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/telemetry.md)
package documentation lists the variables. Environment variables take precedence over product-level defaults, which in turn take
precedence over the telemetry module's base defaults.

The `backend` field is the one exception. If neither `LUXONIS_TELEMETRY_BACKEND` nor `TelemetryDefaults.backend` gives a value,
the last fallback stays dynamic: the backend is `"stdout"` when the resolved `debug` is True, and `"posthog"` otherwise.

Parameters

 * `defaults` (`TelemetryDefaults | None`): Optional product-level defaults used when a given environment variable is not set.

Returns

 * `TelemetryConfig`: A telemetry configuration built from environment variables.

#### Attributes

##### allow_reserved_overrides

Whether callers and context providers may override reserved telemetry control fields. The reserved fields are
`$process_person_profile`, `$session_id`, `source_product`, `source_component`, and `sdk_version`. See
[luxonis_ml.telemetry.context.RESERVED_METADATA_KEYS](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/telemetry/context.md).
Keep the default unless you intend the override. The PostHog backend still sets `schema_version` itself.

##### allowlist

CLI parameter names that may be logged.

##### api_key

API key for the backend, if applicable.

##### backend

Backend name to use, such as `"posthog"` or `"stdout"`.

##### debug

Whether to enable debug behavior such as the stdout backend default.

##### disable_geoip

Whether to disable PostHog GeoIP enrichment.

##### enabled

Whether telemetry should emit events.

##### endpoint

Custom endpoint or host for the backend, if applicable.

##### include_base_context

Whether to include the shared default context on every event.

##### include_system_metadata

Whether to include extended system metadata by default.

### TelemetryDefaults

Optional product-level defaults for telemetry configuration.

Any field left as `None` falls back to the telemetry module's base default for that setting.

#### Attributes

##### allow_reserved_overrides

##### allowlist

##### api_key

##### backend

##### debug

##### disable_geoip

##### enabled

##### endpoint

##### include_base_context

##### include_system_metadata

## Attributes

### T
