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: LightningStoreOTLPExporter, 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: LightningStoreOTLPExporter
OTLPSpanExporter with switchable service control.
When _agentops_service_enabled is False, skip export and return success.
This is used instead of BypassableAuthenticatedOTLPExporter on legacy AgentOps versions.
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.
By default, AgentOps exporters and clients will run in local mode and will NOT attempt to communicate with the remote AgentOps service.
Parameters:
-
enabled(bool, default:True) –If True, enable all AgentOps exporters and clients. All exporters and clients will operate in normal mode and send data to the AgentOps service.
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