Trace AI Agents in MATLAB with OpenTelemetry
Learn how to instrument an agentic chatbot using the MATLAB® Interface to OpenTelemetry Support Package and export traces, metrics, and logs to your existing observability platform. Follow each request as it moves through large language model (LLM) calls, tool executions, and agent decisions, and visualize the complete execution path with distributed tracing. This example demonstrates how OpenTelemetry can help engineers and platform teams understand the behavior of AI-powered applications running as part of larger distributed systems. By capturing telemetry from MATLAB and Simulink® workflows, you can identify performance bottlenecks, correlate activity with upstream and downstream services, and gain increased visibility into performance, quality, and cost drivers such as token usage. Because telemetry is exported using the OpenTelemetry standard, the same instrumentation can be integrated with observability platforms such as Datadog, Splunk, Grafana, Jaeger, and other OpenTelemetry-compatible backends. This enables MATLAB applications, Simulink models, and production deployments to participate in the same monitoring and troubleshooting workflows already used across the enterprise. Whether you are building AI applications, deploying MATLAB algorithms as services, or operating complex IT and engineering systems, OpenTelemetry provides a vendor-neutral way to bring observability to MATLAB and Simulink workloads and connect them to your broader platform engineering strategy. Related resources: - View an example on GitHub: https://github.com/mathworks/OpenTelemetry-MATLAB/blob/main/examples/ai_agent/AddObservabilityToAIAgent.md - Explore how MATLAB and Simulink integrate with your enterprise IT strategy: https://bit.ly/3Vbk4os - MATLAB Interface to OpenTelemetry: https://bit.ly/4rEnpsm -------------------------------------------------------------------------------------------------------- Get a free product trial: https://goo.gl/ZHFb5u Learn more about MATLAB: https://goo.gl/8QV7ZZ Learn more about Simulink: https://goo.gl/nqnbLe See what's new in MATLAB and Simulink: https://goo.gl/pgGtod © 2026 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.