Skip to content

[UI Telemetry] Update documentation page with details on UI telemetry#19427

Merged
daniellok-db merged 7 commits intomlflow:masterfrom
daniellok-db:stack/documentation
Dec 18, 2025
Merged

[UI Telemetry] Update documentation page with details on UI telemetry#19427
daniellok-db merged 7 commits intomlflow:masterfrom
daniellok-db:stack/documentation

Conversation

@daniellok-db
Copy link
Collaborator

@daniellok-db daniellok-db commented Dec 16, 2025

🥞 Stacked PR

Use this link to review incremental changes.


Related Issues/PRs

#xxx

What changes are proposed in this pull request?

This PR updates the usage-tracking page with information about the new UI telemetry.

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

PR docs preview

Does this PR require documentation update?

  • No. You can skip the rest of this section.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Should this PR be included in the next patch release?

Yes should be selected for bug fixes, documentation updates, and other small changes. No should be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.

What is a minor/patch release?
  • Minor release: a release that increments the second part of the version number (e.g., 1.2.0 -> 1.3.0).
    Bug fixes, doc updates and new features usually go into minor releases.
  • Patch release: a release that increments the third part of the version number (e.g., 1.2.0 -> 1.2.1).
    Bug fixes and doc updates usually go into patch releases.
  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive UI telemetry functionality to MLflow, allowing the collection of usage data from user interactions with the MLflow UI. The implementation uses a SharedWorker architecture to batch and send telemetry events efficiently across multiple browser tabs.

Key Changes

  • Implements a SharedWorker-based telemetry client that batches UI interaction events and sends them to the server
  • Adds server-side handlers for receiving and processing UI telemetry data with configurable opt-in/opt-out controls
  • Adds a Settings page in the UI where users can control their telemetry preferences
  • Updates documentation to describe what UI telemetry data is collected and how to opt out

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/telemetry/test_client.py Adds test for batch processing of telemetry records
tests/server/test_handlers.py Adds comprehensive tests for UI telemetry GET/POST handlers
tests/server/conftest.py Adds test fixtures for telemetry testing
mlflow/telemetry/client.py Implements add_records() method for batching multiple telemetry records
mlflow/server/handlers.py Adds GET/POST handlers for UI telemetry with caching and configuration management
mlflow/server/__init__.py Registers new UI telemetry API endpoints
mlflow/server/js/tsconfig.json Adds WebWorker library support for TypeScript
mlflow/server/js/src/telemetry/worker/*.ts Implements SharedWorker for telemetry logging with queue management
mlflow/server/js/src/telemetry/TelemetryClient.ts Client-side API for logging UI events to the worker
mlflow/server/js/src/telemetry/TelemetryInfoAlert.tsx Alert component informing users about telemetry
mlflow/server/js/src/telemetry/README.md Technical documentation for the telemetry architecture
mlflow/server/js/src/settings/SettingsPage.tsx Settings UI for managing telemetry preferences
mlflow/server/js/src/experiment-tracking/routes.ts Adds routing for the settings page
mlflow/server/js/src/common/components/MlflowSidebar.tsx Adds Settings link to the navigation sidebar
mlflow/server/js/src/app.tsx Integrates telemetry client with DesignSystemEventProvider
mlflow/server/js/craco.config.js Configures webpack to bundle the telemetry worker separately
mlflow/server/js/src/lang/default/en.json Adds translations for telemetry-related UI text
mlflow/server/js/src/home/HomePage.tsx Displays telemetry info alert on the home page
docs/docs/community/usage-tracking.mdx Documents UI telemetry data collection and opt-out procedures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

</tr>
<tr>
<td>Timestamp</td>
<td>The client-side timestam of when the interaction occurred</td>
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: "timestam" should be "timestamp"

Suggested change
<td>The client-side timestam of when the interaction occurred</td>
<td>The client-side timestamp of when the interaction occurred</td>

Copilot uses AI. Check for mistakes.

**LogQueue.ts**:

- Simple class that batches logs and uploads them to the server every 15s.
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation inconsistency between the README and the actual LogQueue implementation. The README states logs are batched and uploaded "every 15s", but the actual implementation in LogQueue.ts uses FLUSH_INTERVAL_MS = 30000 (30 seconds). Update the documentation to match the actual implementation.

Suggested change
- Simple class that batches logs and uploads them to the server every 15s.
- Simple class that batches logs and uploads them to the server every 30s.

Copilot uses AI. Check for mistakes.
/**
* LogQueue for batching and uploading telemetry events
*
* Maintains a queue of telemetry records and flushes them every 15 seconds
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation comment incorrectly states the flush interval is 15 seconds, but the constant FLUSH_INTERVAL_MS is set to 30000 (30 seconds). Update the comment to accurately reflect the actual flush interval.

Suggested change
* Maintains a queue of telemetry records and flushes them every 15 seconds
* Maintains a queue of telemetry records and flushes them every 30 seconds

Copilot uses AI. Check for mistakes.


# Cache for telemetry config with 3 hour TTL
_telemetry_config_cache = TTLCache(maxsize=1, ttl=10800)
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache TTL is hardcoded to 10800 seconds (3 hours). Consider extracting this as a named constant with a descriptive name like TELEMETRY_CONFIG_CACHE_TTL_SECONDS to improve maintainability and make it easier to adjust this value in the future.

Suggested change
_telemetry_config_cache = TTLCache(maxsize=1, ttl=10800)
TELEMETRY_CONFIG_CACHE_TTL_SECONDS = 10800
_telemetry_config_cache = TTLCache(maxsize=1, ttl=TELEMETRY_CONFIG_CACHE_TTL_SECONDS)

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

Documentation preview for 85a0c7a is available at:

Changed Pages (1)

More info
  • Ignore this comment if this PR does not change the documentation.
  • The preview is updated when a new commit is pushed to this PR.
  • This comment was created by this workflow run.
  • The documentation was built by this workflow run.

Comment on lines +128 to +139
<tr>
<td>Component ID of interactive UI elements</td>
<td>An ID string of an interactive element (e.g. button, switch, link, input field) in the UI. A log is generated upon clicking, typing, or otherwise interacting with such elements. A comprehensive list of component ID values can be found by [this search query](https://github.com/search?q=repo%3Amlflow%2Fmlflow%20componentId%3D&type=code).</td>
<td>`mlflow.prompts.list.create` (identifier for the "Create prompt" button on the prompts page)</td>
<td>To understand the usage patterns of different UI pages and features</td>
</tr>
<tr>
<td>Metadata associated with UI interactions</td>
<td>See [below table](#ui-interaction-metadata) for metadata associated with UI interaction logs.</td>
<td>`{ "isRemote": true, "browserFamily": "Chrome", "isMobile": false, "eventType": "onClick", "componentViewId": "88fc9edd-5e9e-4a17-abd2-c543f505b8eb", "componentId": "mlflow.prompts.list.create", "componentType": "button", timestamp_ns: 1765784028467000000 }`</td>
<td>To understand UI usage patterns in greater depth, and to inform prioritization of different platforms, browsers, and user flows.</td>
</tr>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought these are included in parameters field?

Copy link
Collaborator Author

@daniellok-db daniellok-db Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are but i think it's not an important distinction (user probably doesn't care about the structure of the payload, just what data is contained inside), i also felt that including all those params into the existing table would be a bit noisy since they only apply to UI events

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include them in Tracked Events table?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Comment on lines +388 to +390
Organizations can disable telemetry by blocking network access to `https://config.mlflow-telemetry.io`. When this endpoint is unreachable, MLflow automatically disables telemetry for the SDK.

To opt out of UI telemetry, you can block network access to `https://d139nb52glx00z.cloudfront.net` from the MLflow server. Similar to above, if this endpoint is unreachable, UI telemetry will be disabled.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if we should make it easy and just say that you can disable all traffic to the mlflow-telemetry.io domain, since that covers both config and ingestion

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think we don't need to mention this section especially https://d139nb52glx00z.cloudfront.net specifically. If we change it to be the same domain as sdk later then people won't check this page again to disable it, and for users who look at this section I feel like they may just opt out entire telemetry

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, simplified the section

@github-actions github-actions bot added v3.8.0 area/docs Documentation issues rn/none List under Small Changes in Changelogs. labels Dec 18, 2025
Comment on lines +292 to +301
<td>Browser family</td>
<td>An enumerated string describing the browser family</td>
<td>`Chrome`, `Safari`, `Firefox`, `Other`</td>
</tr>
<tr>
<td>Mobile status</td>
<td>A boolean indicating whether or not the event took place on a mobile device</td>
<td>`false`</td>
</tr>
<tr>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to note: these do not actually exist in the logs right now but including it here so we can add them in the future without updating the docs

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do we plan to add them? we can update the doc later when adding them right, people may ask you about this data if seeing this :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, removing for now then

Copy link
Collaborator

@serena-ruan serena-ruan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once #19427 (comment) is addressed!

@daniellok-db daniellok-db added this pull request to the merge queue Dec 18, 2025
Merged via the queue into mlflow:master with commit 7787923 Dec 18, 2025
49 of 50 checks passed
@daniellok-db daniellok-db deleted the stack/documentation branch December 18, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation issues rn/none List under Small Changes in Changelogs. v3.8.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants