[UI Telemetry] Allow session_id and installation_id to be overridden in TelemetryRecord#19240
Conversation
|
@daniellok-db Thank you for the contribution! Could you fix the following issue(s)? ⚠ DCO checkThe DCO check failed. Please sign off your commit(s) by following the instructions here. See https://github.com/mlflow/mlflow/blob/master/CONTRIBUTING.md#sign-your-work for more details. |
There was a problem hiding this comment.
Pull request overview
This PR adds support for overriding session_id and installation_id in telemetry records, allowing callers to provide custom values instead of using the defaults from the telemetry client.
- Added optional
installation_idandsession_idfields to theRecorddataclass - Modified
Record.to_dict()to conditionally include these fields when specified - Added comprehensive test coverage for both override and default behavior scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| mlflow/telemetry/schemas.py | Added optional installation_id and session_id fields to Record class with conditional inclusion in to_dict() method to support overriding client defaults |
| tests/telemetry/test_client.py | Added test test_record_with_session_and_installation_id to verify that records can override client's session/installation IDs and fall back to client defaults when not specified |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Documentation preview for e086ee2 is available at: More info
|
69b68c2 to
7307230
Compare
7307230 to
e086ee2
Compare
|
merging, test failure looks like flake since non-windows passed 🤔, plus this change is unrelated to tracing |
…in TelemetryRecord (mlflow#19240)
…in TelemetryRecord (#19240)
🥞 Stacked PR
Use this link to review incremental changes.
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
This PR adds some optional fields to the telemetry
Recorddataclass. This is because with UI telemetry, we plan to reuse the existing telemetry client. However, thesession_idandinstallation_idfields need to come from the browser, not from the python client. The UI will send these as part of the POST request payload, so we need to make sure they are respected.How is this PR tested?
Manually tested end-to-end and made sure they show up correctly in the final table.
Does this PR require documentation update?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow 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" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould 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?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.