-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit telemetry event for bundle init
- Loading branch information
1 parent
a4f5d89
commit 5a44895
Showing
5 changed files
with
66 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package events | ||
|
||
// Corresponds to the `DatabricksCliBundleInitEvent` proto message in `databricks_cli_log.proto` | ||
// as of 20 Dec 2024. | ||
type BundleInitEvent struct { | ||
// UUID associated with the DAB itself. This is serialized into the DAB | ||
// when a user runs `databricks bundle init` and all subsequent deployments of | ||
// that DAB can then be associated with this init event. | ||
Uuid string `json:"uuid,omitempty"` | ||
|
||
// Name of the template initialized when the user ran `databricks bundle init` | ||
// This is only populated when the template is a first party template like | ||
// mlops-stacks or default-python. | ||
TemplateName BundleTemplate `json:"template_name,omitempty"` | ||
|
||
// Arguments used by the user to initialize the template. Only enum | ||
// values will be set here by the Databricks CLI. | ||
// | ||
// We use a generic map representation here because a bundle template's args are | ||
// managed in the template itself and maintaining a copy typed schema for it here | ||
// will be untenable in the long term. | ||
TemplateEnumArgs map[string]string `json:"template_enum_args,omitempty"` | ||
} | ||
|
||
type BundleTemplate string | ||
|
||
const ( | ||
BundleTemplateMlopsStacks BundleTemplate = "mlops-stacks" | ||
BundleTemplateDefaultPython BundleTemplate = "default-python" | ||
BundleTemplateDefaultSql BundleTemplate = "default-sql" | ||
BundleTemplateDbtSql BundleTemplate = "dbt-sql" | ||
BundleTemplateCustom BundleTemplate = "custom" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package events | ||
|
||
// dummy event for testing the telemetry pipeline. Corresponds to `DatabricksCliTestEvent` | ||
// proto in `databricks_cli_log.proto` as of 20 Dec 2024. | ||
type CliTestEvent struct { | ||
Name DummyCliEnum `json:"name,omitempty"` | ||
} | ||
|
||
type DummyCliEnum string | ||
|
||
const ( | ||
DummyCliEnumUnspecified DummyCliEnum = "DUMMY_CLI_ENUM_UNSPECIFIED" | ||
DummyCliEnumValue1 DummyCliEnum = "VALUE1" | ||
DummyCliEnumValue2 DummyCliEnum = "VALUE2" | ||
DummyCliEnumValue3 DummyCliEnum = "VALUE3" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters