# context

Python API: `luxonis_ml.telemetry.context`

## Functions

### base_context

```python
def base_context(*, library_name: str, library_version: str | None, session_id: str, source_component: str | None) -> dict[str, Any]:
```

Create base context for all events.

Parameters

 * `library_name` (`str`): Name of the emitting library.
 * `library_version` (`str | None`): Version string for the library.
 * `session_id` (`str`): Random per-process session ID.
 * `source_component` (`str | None`): Optional component name for the emitter. If omitted, the library name is reused.

Returns

 * `dict[str, Any]`: The shared base context attached to events.

### host_context

```python
def host_context() -> dict[str, Any]:
```

Return coarse host metadata for optional event context.

### host_context_provider

```python
def host_context_provider(_telemetry: object) -> dict[str, Any]:
```

Context provider that exposes coarse host metadata.

### is_ci

```python
def is_ci() -> bool:
```

Best-effort detection of CI environments.

### is_luxonis_cloud

```python
def is_luxonis_cloud() -> bool:
```

Return True when telemetry runs inside the Luxonis cloud.

### normalized_processor

```python
def normalized_processor() -> str:
```

Return a coarse processor family for telemetry.

### system_context

```python
def system_context() -> dict[str, Any]:
```

Return extended runtime metadata for optional event context.

### system_context_provider

```python
def system_context_provider(_telemetry: object) -> dict[str, Any]:
```

Context provider that exposes extended runtime metadata.

## Attributes

### RESERVED_METADATA_KEYS
