Skip to content

[unified_analytics] Resolve rootTool; add root_tool and leaf_tool user properties; deprecate tool #2700

Closed

Description

@keertip

Depends on #2699.

  • Add DashTool? resolveRootTool({required DashTool tool, DashTool? fallbackRootTool}), which resolves in this order:
    1. DASH__TOOL, if it's set, valid, and canBeRootTool
    2. fallbackRootTool, if it canBeRootTool
    3. tool, if it canBeRootTool
    4. otherwise null
  • Make unified_analytics the only place that reads DASH__TOOL.
  • Add a fallbackRootTool parameter to the Analytics constructor.
  • Add two user properties to every event:
    • root_tool: the resolved root tool (the user's entry point).
    • leaf_tool: the logical tool passed by the caller. This can be a top-level tool or a shared component, e.g. dart-tool or analysis-server.
  • Keep sending the existing tool user property with today's value, and mark it deprecated. That's the root tool for shared components and the tool itself otherwise, so existing dashboards keep working. It will be removed in a later release.
  • Add a test-only override for rootTool.

Done when: every event sent through unified_analytics carries root_tool and leaf_tool, and tool is unchanged.

Activity

  1. self-assigned this
    on Oct 28, 2026
  2. changed the title [-][unified_analytics] Resolve rootTool and add root_tool user property[/-] [+][unified_analytics] Resolve rootTool; add root_tool and leaf_tool user properties; deprecate tool[/+] on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions