Uh oh!
There was an error while loading. Please reload this page.
Add telemetry for databricks aitools install - #5862
Conversation
Integration test reportCommit: 733659b
8 interesting tests: 4 RECOVERED, 4 SKIP
Top 10 slowest tests (at least 2 minutes):
|
cd71e38 to
f2bf35bComparef2bf35b to
b477ac6Comparedatabricks aitools install| @@ -13,7 +14,7 @@ func TestLegacySkillsInstallDelegatesToInstall(t *testing.T) { | |||
| setupTestAgents(t) | |||
| calls := setupInstallMock(t) | |||
| ctx := cmdio.MockDiscard(t.Context()) | |||
| ctx := telemetry.WithNewLogger(cmdio.MockDiscard(t.Context())) | |||
There was a problem hiding this comment.
We need the logger for the telemetry because otherwise, it will panic. A logger is always present in the production path through the root command.
b477ac6 to
9b38779Compare9b38779 to
733659bCompare
mihaimitrea-db
left a comment
There was a problem hiding this comment.
Looks good, except for comment.
| if pathFlag != "" { | ||
| _, err := installer.DumpSkillsToPath(ctx, src, pathFlag, opts) | ||
| return err | ||
| } |
There was a problem hiding this comment.
Do we want to log the case where people "install" the skills by just dumping them at a specific path as well? If yes, then this will be missed by the current placement of defer logInstallEvent:
// --path is a dumb dump: no agents, no scope, no state.ifpathFlag!="" {
deferlogInstallEvent(ctx, plan, installOpts{
Scope: opts.Scope,
Experimental: opts.IncludeExperimental,
})
_, err:=installer.DumpSkillsToPath(ctx, src, pathFlag, opts)
returnerr
}Maybe add a call to defer in the if block before DumpSkillsToPath or find a place for the current call to cover both while not logging an install on failure.
There was a problem hiding this comment.
Yeah, it's weird to have this. I will address this as a follow-up.
eng-dev-ecosystem-bot
commented
Jul 13, 2026
Integration test reportCommit: a676b0d
17 interesting tests: 9 flaky, 3 KNOWN, 2 FAIL, 2 SKIP, 1 RECOVERED
Top 50 slowest tests (at least 2 minutes):
|
…databricks#5984) `TestCountFuzz/aitools/install` panics with `telemetry logger not found`, but only on machines with a supported coding agent installed. Two causes: 1. `aitools` is hand-written but was being fuzzed. It was missing from the fuzz harness `manualRoots` blocklist added in databricks#5102 (the test targets auto-generated commands, guarding against codegen regressions like databricks#5070). 2. `telemetry.Log` panicked when no logger was on the context, which `aitools install` started triggering in databricks#5862 (telemetry for the command). CI never caught it: `install`'s deferred `logInstallEvent` only runs once an agent is detected, and the panic is unreachable via the real CLI anyway (`cmd/root.Execute` always installs the logger; the fuzz harness bypasses it). This pull request and its description were written by Isaac.
🥞 Stacked PR
Use this link to review incremental changes.
Changes
Emit a structured
AitoolsInstallEventtelemetry event on every run ofdatabricks aitools install(and its deprecatedexperimental aitools skills installalias, which delegates to the same command). The event records three closed-set, non-PII dimensions: the agents targeted (agents, from the fixed agent registry), the install scope (scope, project or global), and whether experimental skills were requested (experimental).aitools installis otherwise a fully local command (skills are fetched from GitHub), so it never resolves auth on its own.tryConfigureAuthresolves auth config best-effort into the context sotelemetry.Uploadat command exit has somewhere to send. A user with no configured profile still installs offline and simply emits nothing.Why
aitools installhad no usage signal. This lets us measure adoption of Databricks skills across coding agents — how many installs, for which agents, at which scope, and how often the experimental skills are pulled in.Tests
Unit tests.