Skip to content

sift_py.ingestion.config.telemetry

CLASS DESCRIPTION
TelemetryConfig

Configurations necessary to start ingestion.

TelemetryConfigValidationError

When the telemetry config has invalid properties

TelemetryConfig

TelemetryConfig(
    asset_name: str,
    ingestion_client_key: Optional[str] = None,
    organization_id: Optional[str] = None,
    flows: List[FlowConfig] = [],
    rules: List[RuleConfig] = [],
)

Configurations necessary to start ingestion. - asset_name: The name of the asset that you wish to telemeter data for. - ingestion_client_key: Optional string chosen by the user to uniquely identify this ingestion configuration. If this isn't supplied a sha256 hash will be used as the client key. - flows: A single flow can specify a single channel value or a set of channel values that are ingested together. - organization_id: ID of your organization in Sift. This field is only required if your user belongs to multiple organizations. - rules: Rules to evaluate during ingestion.

Will raise a TelemetryConfigValidationError under the following conditions: - Multiple flows with the same name - Multiple rules with the same name - Identical channels in the same flow

METHOD DESCRIPTION
hash
try_from_yaml

Initializes a telemetry config from a YAML file found at the provided path as well as optional

validate_flows

Ensures no duplicate channels and flows with the same name, otherwise raises a TelemetryConfigValidationError exception.

validate_rules

Ensure that there are no rules with identical names

ATTRIBUTE DESCRIPTION
asset_name

TYPE: str

flows

TYPE: List[FlowConfig]

ingestion_client_key

TYPE: str

organization_id

TYPE: Optional[str]

rules

TYPE: List[RuleConfig]

asset_name instance-attribute

asset_name: str = asset_name

flows instance-attribute

flows: List[FlowConfig] = flows

ingestion_client_key instance-attribute

ingestion_client_key: str

organization_id instance-attribute

organization_id: Optional[str] = organization_id

rules instance-attribute

rules: List[RuleConfig] = rules

hash

hash() -> str

try_from_yaml classmethod

try_from_yaml(
    path: Path,
    named_expression_modules: Optional[List[Path]] = None,
    named_rule_modules: Optional[List[Path]] = None,
) -> Self

Initializes a telemetry config from a YAML file found at the provided path as well as optional paths to named expression modules if named expressions are leveraged.

validate_flows staticmethod

validate_flows(flows: List[FlowConfig])

Ensures no duplicate channels and flows with the same name, otherwise raises a TelemetryConfigValidationError exception.

validate_rules staticmethod

validate_rules(rules: List[RuleConfig])

Ensure that there are no rules with identical names

TelemetryConfigValidationError

TelemetryConfigValidationError(message: str)

Bases: Exception

When the telemetry config has invalid properties

ATTRIBUTE DESCRIPTION
message

TYPE: str

message instance-attribute

message: str