Skip to content

Commit

Permalink
Added Databricks CLI version as part of routed command telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
nfx committed Sep 24, 2024
1 parent 2bfbf18 commit e83fc54
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/databricks/labs/blueprint/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import inspect
import json
import logging
import os
import types
from collections.abc import Callable
from dataclasses import dataclass
Expand Down Expand Up @@ -85,6 +86,9 @@ def _route(self, raw):
# user agent is set consistently with the Databricks CLI:
# see https://github.com/databricks/cli/blob/main/cmd/root/user_agent_command.go#L35-L37
with_user_agent_extra("cmd", command)
cli_version = os.environ.get("DATABRICKS_CLI_VERSION")
if cli_version:
with_user_agent_extra("cli", cli_version)
flags = payload["flags"]
log_level = flags.pop("log_level")
if log_level == "disabled":
Expand Down

0 comments on commit e83fc54

Please sign in to comment.