[Doc] Merge TS tracing docs with Python#19317
Conversation
Signed-off-by: Kevin Lin <kevin.lin@databricks.com>
There was a problem hiding this comment.
Pull request overview
This PR merges TypeScript tracing documentation into the Python Manual Tracing documentation, providing side-by-side code samples for both languages. The key changes include updating the TracingIntegrations component to support language-based filtering with tab navigation and reorganizing the manual tracing documentation to accommodate both Python and TypeScript examples.
- Updated TracingIntegrations component to add
languagesfield to each integration and implement tab-based filtering - Merged TypeScript SDK documentation into manual-tracing.mdx with TabsWrapper for language switching
- Minor updates to tracing index page (cardGroupProps and link text)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/src/components/TracingIntegrations/index.tsx | Adds language filtering support with tabs, refactors component to separate IntegrationContent, and adds languages array to all integrations |
| docs/docs/genai/tracing/app-instrumentation/manual-tracing.mdx | Merges TypeScript examples alongside Python, reorganizes sections with TabsWrapper for language switching, and adds "Code Block" section |
| docs/docs/genai/tracing/index.mdx | Updates cardGroupProps columns from 6 to 5 and changes link text from "context manager" to "code block" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Documentation preview for 378fff0 is available at: Changed Pages (3)
More info
|
Signed-off-by: Kevin Lin <kevin.lin@databricks.com>
BenWilson2
left a comment
There was a problem hiding this comment.
This looks really nice - I like the flow of the information and the page reads more in a streamlined way. Great work!
| // Wrap the function with mlflow.trace to create a traced function. | ||
| const tracedGetWeather = mlflow.trace( | ||
| getWeather, | ||
| { name: 'get-weather' } |
There was a problem hiding this comment.
do we need to specify name here? i think we try to do some automatic name parsing, but might not work with arrow syntax (e.g. const getWeather = async () => ...).
i believe it should work if the function is declared using the function keyword though, e.g.
async function getWeather(city: string) => { ... }
// trace should have name attached automatically
const tracesGetWeather = mlflow.trace(getWeather);There was a problem hiding this comment.
@daniellok-db got it. if this only works for function, shall we always recommend specifying name? Since user might not want to change the existing the code for the function they are tracing.
There was a problem hiding this comment.
yeah that's a good point, i think always recommending name is good as a best practice 👍
daniellok-db
left a comment
There was a problem hiding this comment.
overall LG just left some comments
Signed-off-by: Kevin Lin <kevin.lin@databricks.com>
🛠 DevTools 🛠
Install mlflow from this PR
For Databricks, use the following command:
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
This PR does mainly 2 things:
NOTE: /genai/tracing/app-instrumentation/typescript-sdk.mdx will be removed in the next PR since its content is already covered after merging this PR.
How is this PR tested?
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.