Instrumentation API¶
agentlightning.instrumentation.instrument_all()
¶
Instrument all the instrumentation libraries.
agentlightning.instrumentation.uninstrument_all()
¶
Uninstrument all the instrumentation libraries.
AgentOps LangChain¶
agentlightning.instrumentation.agentops_langchain
¶
AgentOps¶
agentlightning.instrumentation.agentops
¶
BypassableAuthenticatedOTLPExporter
¶
Bases: AuthenticatedOTLPExporter
AuthenticatedOTLPExporter with switchable service control.
When _agentops_service_enabled is False, skip export and return success.
BypassableOTLPMetricExporter
¶
Bases: OTLPMetricExporter
OTLPMetricExporter with switchable service control.
When _agentops_service_enabled is False, skip export and return success.
BypassableOTLPSpanExporter
¶
Bases: OTLPSpanExporter
OTLPSpanExporter with switchable service control.
When _agentops_service_enabled is False, skip export and return success.
BypassableV3Client
¶
Bases: V3Client
V3Client with toggleable authentication calls.
Returns dummy auth response when _agentops_service_enabled is False.
BypassableV4Client
¶
Bases: V4Client
V4Client with toggleable post requests.
Returns dummy response when _agentops_service_enabled is False.
enable_agentops_service(enabled=True)
¶
Enable or disable communication with the AgentOps service.
False (default): AgentOps exporters and clients will run in local mode and will not attempt to communicate with the remote AgentOps service. True: all exporters and clients will operate in normal mode and send data to the AgentOps service as expected.
instrument_agentops()
¶
Instrument agentops to capture token IDs. Automatically detects and uses the appropriate patching method based on the installed agentops version.
uninstrument_agentops()
¶
Uninstrument agentops to stop capturing token IDs.
LiteLLM¶
agentlightning.instrumentation.litellm
¶
LiteLLM instrumentations.
It's unclear whether or not this file is useful. It seems that LiteLLM owns its own telemetry from their own entrance