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 |
validate_flows |
Ensures no duplicate channels and flows with the same name, otherwise raises a |
validate_rules |
Ensure that there are no rules with identical names |
| ATTRIBUTE | DESCRIPTION |
|---|---|
asset_name |
TYPE:
|
flows |
TYPE:
|
ingestion_client_key |
TYPE:
|
organization_id |
|
rules |
TYPE:
|
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