Mirascope Frog Logo
Mirascope
DocsBlogPricingCloud
⌘K
Type to search
⌘Kto search
Escto close
mirascope
v1.25.7
1.3k
Join our
WelcomeLearnGuidesAPI Referencev1 (Legacy)
LLMOps
configurationcontextexceptionspropagationsessionspanstraced_callstraced_functionstracingversioned_callsversioned_functionsversioning
Instrumentation
llm
# llm ## <ApiType type="Function" slug="instrument_llm" symbolName="instrument_llm" /> instrument_llm Enable GenAI 1.38 span emission for future `llm.Model` calls and streams. Uses the tracer provider configured via `ops.configure()`. If no provider was configured, uses the global OpenTelemetry tracer provider. Example: Enable instrumentation with a custom provider: ```python from mirascope import ops from opentelemetry.sdk.trace import TracerProvider provider = TracerProvider() ops.configure(tracer_provider=provider) ops.instrument_llm() ``` <ReturnTable returnType={{ "type_info": { "type_str": "None", "description": null, "kind": "simple", "symbol_name": "None", "doc_url": "https://docs.python.org/3/library/constants.html#None" } }} /> ## <ApiType type="Function" slug="uninstrument_llm" symbolName="uninstrument_llm" /> uninstrument_llm Disable previously configured instrumentation. <ReturnTable returnType={{ "type_info": { "type_str": "None", "description": null, "kind": "simple", "symbol_name": "None", "doc_url": "https://docs.python.org/3/library/constants.html#None" } }} />

On this page

On this page

© 2026 Mirascope. All rights reserved.

Mirascope® is a registered trademark of Mirascope, Inc. in the U.S.

Privacy PolicyTerms of Use