databricks.labs.dqx.telemetry
log_telemetry
def log_telemetry(ws: WorkspaceClient, key: str, value: str) -> None
Trace specific telemetry information in the Databricks workspace by setting user agent extra info.
Arguments:
ws
- WorkspaceClientkey
- telemetry key to logvalue
- telemetry value to log
telemetry_logger
def telemetry_logger(key: str,
value: str,
workspace_client_attr: str = "ws") -> Callable
Decorator to log telemetry for method calls. By default, it expects the decorated method to have "ws" attribute for workspace client.
Usage: @telemetry_logger("telemetry_key", "telemetry_value") # Uses "ws" attribute for workspace client by default @telemetry_logger("telemetry_key", "telemetry_value", "my_ws_client") # Custom attribute
Arguments:
key
- Telemetry key to logvalue
- Telemetry value to logworkspace_client_attr
- Name of the workspace client attribute on the class (defaults to "ws")