class documentation

class TelemetryConfig:

Constructor: TelemetryConfig.from_environ(defaults)

View In Hierarchy

Configuration for telemetry collection.

Class Method from_environ Build a config from environment variables.
Instance Variable allow_reserved_overrides Whether callers and context providers may override reserved telemetry control fields.
Instance Variable allowlist CLI parameter names that may be logged.
Instance Variable api_key API key for the backend, if applicable.
Instance Variable backend Backend name to use, such as "posthog" or "stdout".
Instance Variable debug Whether to enable debug behavior such as the stdout backend default.
Instance Variable disable_geoip Whether to disable PostHog GeoIP enrichment.
Instance Variable enabled Whether telemetry should emit events.
Instance Variable endpoint Custom endpoint or host for the backend, if applicable.
Instance Variable include_base_context Whether to include the shared default context on every event.
Instance Variable include_system_metadata Whether to include extended system metadata by default.
@classmethod
def from_environ(cls, defaults: TelemetryDefaults | None = None) -> TelemetryConfig:

Build a config from environment variables.

Reads the LUXONIS_TELEMETRY_* settings and returns a fully populated TelemetryConfig instance. Environment variables take precedence over product-level defaults, which in turn take precedence over the telemetry module's base defaults.

Parameters
defaults:TelemetryDefaults | NoneOptional product-level defaults used when a given environment variable is not set.
Returns
TelemetryConfigA telemetry configuration built from environment variables.
allow_reserved_overrides: bool =

Whether callers and context providers may override reserved telemetry control fields.

allowlist: set[str] | None =

CLI parameter names that may be logged.

api_key: str | None =

API key for the backend, if applicable.

backend: str =

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

debug: bool =

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

disable_geoip: bool =

Whether to disable PostHog GeoIP enrichment.

enabled: bool =

Whether telemetry should emit events.

endpoint: str | None =

Custom endpoint or host for the backend, if applicable.

include_base_context: bool =

Whether to include the shared default context on every event.

include_system_metadata: bool =

Whether to include extended system metadata by default.