<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Elastic Observability Labs - Articles by Daniela Tzvetkova</title>
        <link>https://www.elastic.co/observability-labs</link>
        <description>Trusted security news &amp; research from the team at Elastic.</description>
        <lastBuildDate>Thu, 04 Jun 2026 17:54:35 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>Elastic Observability Labs - Articles by Daniela Tzvetkova</title>
            <url>https://www.elastic.co/observability-labs/assets/observability-labs-thumbnail.png</url>
            <link>https://www.elastic.co/observability-labs</link>
        </image>
        <copyright>© 2026. Elasticsearch B.V. All Rights Reserved</copyright>
        <item>
            <title><![CDATA[LLM Observability for Google Cloud’s Vertex AI platform - understand performance, cost and reliability]]></title>
            <link>https://www.elastic.co/observability-labs/blog/elevate-llm-observability-with-gcp-vertex-ai-integration</link>
            <guid isPermaLink="false">elevate-llm-observability-with-gcp-vertex-ai-integration</guid>
            <pubDate>Wed, 09 Apr 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Enhance LLM observability with Elastic's GCP Vertex AI Integration — gain actionable insights into model performance, resource efficiency, and operational reliability.]]></description>
            <content:encoded><![CDATA[<p>As organizations increasingly adopt large language models (LLMs) for AI-powered applications such as content creation, Retrieval-Augmented Generation (RAG), and data analysis, SREs and developers face new challenges. Tasks like monitoring workflows, analyzing input and output, managing query latency, and controlling costs become critical. LLM observability helps address these issues by providing clear insights into how these models perform, allowing teams to quickly identify bottlenecks, optimize configurations, and improve reliability. With better observability, SREs can confidently scale LLM applications, especially on platforms like <a href="https://cloud.google.com/vertex-ai">Google Cloud’s Vertex AI</a>.</p>
<h3>New Elastic Observability LLM integration with Google Cloud’s Vertex AI platform</h3>
<p>We are thrilled to announce general availability of monitoring LLMs hosted in Google Cloud through the <a href="https://www.elastic.co/docs/current/integrations/gcp_vertexai">Elastic integration with Vertex AI</a>. This integration enables users to experience enhanced LLM Observability by providing deep insights into the usage, cost and operational performance of models on Vertex AI, including latency, errors, token usage, frequency of model invocations as well as resources utilized by models. By leveraging this data, organizations can optimize resource usage, identify and resolve performance bottlenecks, and enhance the model efficiency and accuracy.</p>
<h3>Observability needs for AI-powered applications using the Vertex AI platform</h3>
<p>Leveraging AI models creates unique needs around the observability and monitoring of AI-powered applications. Some of the challenges that come with using LLMs are related to the high cost to call the LLMs, the quality and safety of LLM responses, and the performance, reliability and availability of the LLMs.</p>
<p>Lack of visibility into LLM observability data can make it harder for SREs and DevOps teams to ensure their AI-powered applications meet their service level objectives for reliability, performance, cost and quality of the AI-generated content and have enough telemetry data to troubleshoot related issues. Thus, robust LLM observability and detection of anomalies in the performance of models hosted on Google Cloud’s Vertex AI platform in real time is critical for the success of AI-powered applications.</p>
<p>Depending on the needs of their LLM applications, customers can make use of a growing list of models hosted on the Vertex AI platform such as Gemini 2.0 Pro, Gemini 2.0 Flash, and Imagen for image generation. Each model excels in specific areas and generates content in some modalities including Language, Audio, Vision, Code, etc. No two models are the same; each model has specific performance characteristics. So, it is important that service operators are able to track the individual performance, behaviour and cost of each model.</p>
<h3>Unlocking Insights with Vertex AI Metrics</h3>
<p>The Elastic integration with Google Cloud’s Vertex AI platform collects a wide range of metrics from models hosted on Vertex AI, enabling users to monitor, analyze, and optimize their AI deployments effectively.</p>
<p>Once you use the integration, you can review all the metrics in the Vertex AI dashboard</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elevate-llm-observability-with-gcp-vertex-ai-integration/Overview.png" alt="Overview Dashboard" /></p>
<p>These metrics can be categorized into the following groups:</p>
<h4>1. Prediction Metrics</h4>
<p>Prediction metrics provide critical insights into model usage, performance bottlenecks, and reliability. These metrics help ensure smooth operations, optimize response times, and maintain robust, accurate predictions.</p>
<ul>
<li>
<p><strong>Prediction Count by Endpoint</strong>: Measures the total number of predictions across different endpoints.</p>
</li>
<li>
<p><strong>Prediction Latency</strong>: Provides insights into the time taken to generate predictions, allowing users to identify bottlenecks in performance.</p>
</li>
<li>
<p><strong>Prediction Errors</strong>: Monitors the count of failed predictions across endpoints.</p>
</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elevate-llm-observability-with-gcp-vertex-ai-integration/Prediction.png" alt="Prediction Metrics" /></p>
<h4>2. Model Performance Metrics</h4>
<p>Model performance metrics provide crucial insights into deployment efficiency, and responsiveness. These metrics help optimize model performance and ensure reliable operations.</p>
<ul>
<li>
<p><strong>Model Usage</strong>: Tracks the usage distribution among different model deployments.</p>
</li>
<li>
<p><strong>Token Usage</strong>: Tracks the number of tokens consumed by each model deployment, which is critical for understanding model efficiency.</p>
</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elevate-llm-observability-with-gcp-vertex-ai-integration/token_model_usage.png" alt="Token model usage" /></p>
<ul>
<li>
<p><strong>Invocation Rates</strong>: Tracks the frequency of invocations made by each model deployment.</p>
</li>
<li>
<p><strong>Model Invocation Latency</strong>: Measures the time taken to invoke a model, helping in diagnosing performance issues.</p>
</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elevate-llm-observability-with-gcp-vertex-ai-integration/Invocation_Vertex.png" alt="Model Invocation Metrics" /></p>
<h4>3. Resource Utilization Metrics</h4>
<p>Resource utilization metrics are vital for monitoring resource efficiency and workload performance. They help optimize infrastructure, prevent bottlenecks, and ensure smooth operation of AI deployments.</p>
<ul>
<li>
<p><strong>CPU Utilization</strong>: Monitors CPU usage to ensure optimal resource allocation for AI workloads.</p>
</li>
<li>
<p><strong>Memory Usage</strong>: Tracks the memory consumed across all model deployments.</p>
</li>
<li>
<p><strong>Network Usage</strong>: Measures bytes sent and received, providing insights into data transfer during model interactions.</p>
</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elevate-llm-observability-with-gcp-vertex-ai-integration/Resource_Utilization.png" alt="Resource Utilization Metrics" /></p>
<h4>4. Overview Metrics</h4>
<p>These metrics give an overview of the models deployed in Google Cloud’s Vertex AI platform. They are essential for tracking overall performance, optimizing efficiency, and identifying potential issues across deployments.</p>
<ul>
<li>
<p><strong>Total Invocations</strong>: The overall count of prediction invocations across all models and endpoints, providing a comprehensive view of activity.</p>
</li>
<li>
<p><strong>Total Tokens</strong>: The total number of tokens processed across all model interactions, offering insights into resource utilization and efficiency.</p>
</li>
<li>
<p><strong>Total Errors</strong>: The total count of errors encountered across all models and endpoints, helping identify reliability issues.</p>
</li>
</ul>
<p>All metrics can be filtered by <strong>region</strong>, offering localized insights for better analysis.</p>
<p>Note: The Elastic I integration with Vertex AI provides comprehensive visibility into both deployment models: provisioned throughput, where capacity is pre-allocated, and pay-as-you-go, where resources are consumed on demand.</p>
<h3>Conclusion</h3>
<p>This <a href="https://www.elastic.co/docs/current/integrations/gcp_vertexai">integration with Vertex AI</a> represents a significant step forward in enhancing the LLM Observability for users of Google Cloud’s Vertex AI platform. By unlocking a wealth of actionable data, organizations can assess the health, performance and cost of LLMs and troubleshoot operational issues, ensuring scalability, and accuracy in AI-driven applications.</p>
<p>Now that you know how the Vertex AI integration enhances LLM Observability, it’s your turn to try it out n. Spin up an Elastic Cloud, and start monitoring your LLM applications hosted on Google Cloud’s Vertex AI platform.</p>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/elevate-llm-observability-with-gcp-vertex-ai-integration/vertexai-title.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Troubleshooting your Agents and Amazon Bedrock AgentCore with Elastic Observability]]></title>
            <link>https://www.elastic.co/observability-labs/blog/llm-agentic-ai-observability-amazon-bedrock-agentcore</link>
            <guid isPermaLink="false">llm-agentic-ai-observability-amazon-bedrock-agentcore</guid>
            <pubDate>Mon, 01 Dec 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Discover how to achieve end-to-end observability for Amazon Bedrock AgentCore: from tracking service health and token costs to debugging complex reasoning loops with distributed tracing.]]></description>
            <content:encoded><![CDATA[<h2>Troubleshooting your Agents and Amazon Bedrock AgentCore with Elastic Observability</h2>
<h3>Introduction</h3>
<p>We're excited to introduce Elastic Observability’s Amazon Bedrock AgentCore integration, which allows users to observe <a href="https://aws.amazon.com/bedrock/agentcore/">Amazon Bedrock AgentCore</a> and the agents' LLM interactions end-to-end. Agentic AI represents a fundamental shift in how we build applications. </p>
<p>Unlike standard LLM chatbots that simply generate text, agents can reason, plan, and execute multi-step workflows to complete complex tasks autonomously. Many times these agents are running on a platform such as Amazon Bedrock AgentCore, which helps developers build, deploy and scale agents. Amazon Bedrock AgentCore is Amazon Bedrock's platform providing the secure, scalable, and modular infrastructure services (like agent runtime, memory, and identity) necessary for developers to deploy and operate highly capable AI agents built with any framework or model.</p>
<p>Using a platform, such as Amazon Bedrock Agentcore, is easy, but troubleshooting an agent is far more complex than debugging a standard microservice. Key challenges include:</p>
<ul>
<li>
<p><strong>Non-Deterministic Behavior:</strong> Agents may choose different tools or reasoning paths for the same prompt, making it difficult to reproduce bugs.</p>
</li>
<li>
<p><strong>&quot;Black Box&quot; Execution:</strong> When an agent fails or provides a hallucinated answer, it is often unclear if the issue lies in the LLM's reasoning, the context provided, or a failed tool execution.</p>
</li>
<li>
<p><strong>Cost &amp; Latency Blind Spots:</strong> A single user query can trigger recursive loops or expensive multi-step tool calls, leading to unexpected spikes in token usage and latency.</p>
</li>
</ul>
<p>To effectively observe these systems, you need to correlate signals from two distinct layers:</p>
<ol>
<li>
<p><strong>The Platform Layer (Amazon Bedrock AgentCore):</strong> You need to understand the overall health of the managed service. This includes high-level metrics like invocation counts, latency, throttling, and platform-level errors that affect all agents running in AgentCore.</p>
</li>
<li>
<p><strong>The Application Layer (Your Agentic Logic):</strong> You want to understand the granular &quot;why&quot; behind the behavior. This includes distributed traces, usually with OpenTelemetry, that visualize the full request lifecycle (e.g. waterfall view), identifying exactly which step in the reasoning chain failed or took too long.</p>
</li>
</ol>
<p><strong>Agentic AI Observability in Elastic</strong> provides a unified, end-to-end view of your agentic deployment by combining platform-level insights from Amazon Bedrock AgentCore, through the new <a href="https://www.elastic.co/docs/reference/integrations/aws_bedrock_agentcore">Amazon Bedrock AgentCore integration</a>, with deep application-level visibility from OpenTelemetry (OTel) traces, logs and metrics form the agent. This unified view in Elastic allows you to observe, troubleshoot, and optimize your agentic applications from end to end without switching tools. Additionally, Elastic provides Agent Builder which allows you to create agents to analyze any of the data from Amazon Bedrock AgentCore and the agents running on it.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-agentic-ai-observability-amazon-bedrock-agentcore/amazon-bedrock-agentcore-dashboard-runtime-gateway-traces.jpg" alt="Amazon Bedrock AgentCore Dashboards for Runtime and Gateway and APM Tracing" /></p>
<h2>Agentic AI Observability in Elastic</h2>
<p>As mentioned above there are two main parts to end-to-end Agentic AI Observability in Elastic.</p>
<ul>
<li>
<p><strong>Amazon Bedrock AgentCore Platform Observability -</strong> using platform logs and metrics,  Elastic provides comprehensive visibility into the high-level health of the AgentCore service by ingesting AWS vended logs and metrics across four critical components:</p>
<ul>
<li>
<p><strong>Runtime:</strong> Monitor core performance indicators such as agent errors, overall latency, throttle counts, and invocation rates, for each endpoint. </p>
</li>
<li>
<p><strong>Gateway:</strong> specific insights into gateway and tool call performance, including invocations, error rates, and latency.</p>
</li>
<li>
<p><strong>Memory:</strong> Track short-term and long-term memory operations, including event creation, retrieval, and listing, alongside performance analysis, errors, and latency metrics.</p>
</li>
<li>
<p><strong>Identity:</strong> Audit security and access health with logs on successful and failed access attempts.</p>
</li>
</ul>
</li>
</ul>
<ul>
<li><strong>Agent Observability with APM, logs and metrics -</strong> To understand <em>how</em> your agent is behaving, Elastic ingests OTel-native traces, metrics and logs from your application running within AgentCore. This allows you to visualize the full execution path, including LLM reasoning steps and tool calls, in a detailed waterfall diagram. </li>
</ul>
<ul>
<li><strong>Agentic AI Analysis</strong> - All of the data from Amazon Bedrock AgentCore and the agent running on it, can be analyzed with <strong>Elastic’s AI driven capabilities</strong>. These include:</li>
</ul>
<ul>
<li>
<p><strong>Elastic AgentCore SRE Agent built on Elastic Agent Builder</strong> - We don't just monitor agents; we provide you with one to assist your team. The <strong>AgentCore SRE Agent</strong> is a specialized assistant built using <strong>Elastic Agent Builder</strong>. It possesses specialized knowledge of AgentCore applications observed in Elastic.</p>
<ul>
<li>
<p><strong>How it helps:</strong> You can ask specific questions regarding your AgentCore environment, such as how to interpret a complex error log or why a specific trace shows latency.</p>
</li>
<li>
<p><strong>Get the Agent:</strong> You can deploy this agent yourself from our <a href="https://github.com/elastic/observability-examples/tree/main/aws/amazon-bedrock-agentcore/elastic_agentcore_sre_agent">GitHub repository</a>.</p>
</li>
</ul>
</li>
<li>
<p><strong>Elastic Observability AI Assistant</strong> - Use natural language anywhere in Elastic’s UI to help you pinpoint issues, analyze something specific, or just learn what the problem is through LLM knowledge base. Additionally, SREs can interpret log messages, errors, metrics patterns, optimize code, write reports, and even identify and execute a runbook, or find a related github issue.</p>
</li>
<li>
<p><strong>Streams -</strong> AI-Driven Log Analysis - When you send AgentCore logs from your instrumented application into Elastic, you can parse and analyze them. Additionally, Streams finds <strong>Significant Events</strong> within your log stream allowing you to focus immediately on what matters most.</p>
</li>
<li>
<p><strong>Dashboards and ES|QL</strong> Data is only useful if you can act on it. Elastic provides out-of-the-box (OOTB) assets to accelerate your mean time to resolution (MTTR). And Elastic provides ES|QL to help you perform ad-hoc analysis on any signal</p>
<ul>
<li>
<p><strong>OOTB Dashboards:</strong> Pre-built visualizations based on AgentCore service signals. These dashboards provide an immediate, high-level overview of the usage, health, and performance of your AgentCore runtime, gateway, memory, and identity components.</p>
</li>
<li>
<p><strong>OOTB Alert Templates:</strong> Pre-configured alerts for common agentic issues (e.g., high error rates, latency spikes, or unusual token consumption), allowing you to move from reactive to proactive troubleshooting immediately.</p>
</li>
</ul>
</li>
</ul>
<h2>Onboarding Amazon Bedrock AgentCore signals into Elastic</h2>
<h3> Amazon Bedrock AgentCore Integration</h3>
<p>To get started with platform-level visibility, you need to enable the <strong>Amazon Bedrock AgentCore</strong> integration in Elastic. This integration automatically collects metrics and logs from your AgentCore runtime, gateway, memory, and identity components via Amazon CloudWatch.</p>
<p><strong>Setup Steps:</strong></p>
<ol>
<li>
<p><strong>Prepare AWS Environment:</strong> Ensure your AgentCore agents are deployed and running and that you have enabled logging on your AgentCore resources in the AWS console.</p>
</li>
<li>
<p><strong>Add the Integration:</strong></p>
<ul>
<li>
<p>In Elastic (Kibana), navigate to <strong>Integrations</strong>.</p>
</li>
<li>
<p>Search for <strong>&quot;Amazon Bedrock AgentCore&quot;</strong>. Select <strong>Add Amazon Bedrock AgentCore</strong>.</p>
</li>
</ul>
</li>
<li>
<p><strong>Configure &amp; Deploy:</strong></p>
<p>Configure Elastic's Amazon Bedrock AgentCore integration to collect CloudWatch metrics from your chosen AWS region at the specified collection interval. Logs will be added soon after the publication of this blog.</p>
</li>
</ol>
<h3>Onboard the Agent with OTel Instrumentation</h3>
<p>The next step is observing the application logic itself. The beauty of Amazon Bedrock AgentCore is that the application runtime often comes pre-instrumented. You simply need to tell it where to send the telemetry data.</p>
<p>For this example, we will use the <a href="https://github.com/elastic/observability-examples/tree/main/aws/amazon-bedrock-agentcore/travel_assistant"><strong>Travel Assistant</strong></a> from the Elastic Observability examples.</p>
<p>To instrument this agent, you do not need to modify the source code. Instead, when you invoke the agent using the <code>agentcore</code> CLI, you simply pass your Elastic connection details as environment variables. This redirects the OTel signals (traces, metrics, and logs) directly to the Elastic EDOT collector.</p>
<p><strong>Example Invoke Command:</strong> Run the following command to launch the agent and start streaming telemetry to Elastic:</p>
<pre><code class="language-bash">    agentcore launch \
    --env BEDROCK_MODEL_ID=&quot;us.anthropic.claude-3-5-sonnet-20240620-v1:0&quot; \
    --env OTEL_EXPORTER_OTLP_ENDPOINT=&quot;https://&lt;REPLACE_WITH_ELASTIC_ENDPOINT&gt;.region.cloud.elastic.co:443&quot; \
    --env OTEL_EXPORTER_OTLP_HEADERS=&quot;Authorization=ApiKey &lt;REPLACE_WITH_YOUR_API_KEY&gt;&quot; \
    --env OTEL_EXPORTER_OTLP_PROTOCOL=&quot;http/protobuf&quot; \
    --env OTEL_METRICS_EXPORTER=&quot;otlp&quot; \
    --env OTEL_TRACES_EXPORTER=&quot;otlp&quot; \
    --env OTEL_LOGS_EXPORTER=&quot;otlp&quot; \
    --env OTEL_RESOURCE_ATTRIBUTES=&quot;service.name=travel_assistant,service.version=1.0.0&quot; \
    --env AGENT_OBSERVABILITY_ENABLED=&quot;true&quot; \
    --env DISABLE_ADOT_OBSERVABILITY=&quot;true&quot; \
    --env TAVILY_API_KEY=&quot;&lt;REPLACE_WITH_YOUR_TAVILY_KEY&gt;&quot;
</code></pre>
<p><strong>Key Configuration Parameters:</strong></p>
<ul>
<li>
<p><code>OTEL_EXPORTER_OTLP_ENDPOINT</code>: Your Elastic OTLP endpoint (ensure port 443 is specified).</p>
</li>
<li>
<p><code>OTEL_EXPORTER_OTLP_HEADERS</code>: The Authorization header containing your Elastic API Key.</p>
</li>
<li>
<p><code>DISABLE_ADOT_OBSERVABILITY=true</code>: This ensures the native AgentCore signals are routed exclusively to your defined endpoint (Elastic) rather than default AWS paths.</p>
</li>
</ul>
<h2>Analyzing Agentic Data in Elastic Observability</h2>
<p>As we walk through the analysis features below, we will use the Travel Assistant agent which we instrumented earlier as well as any other apps you may be running on AgentCore. For the purposes of this example, as a second agent, we will use <a href="https://github.com/awslabs/amazon-bedrock-agentcore-samples/tree/main/02-use-cases/customer-support-assistant"><strong>Customer Support Assistant</strong></a> from the AWS Labs AgentCore samples </p>
<h3>Out-of-the-Box (OOTB) Dashboards</h3>
<p>Elastic populates a set of comprehensive dashboards based on Amazon Bedrock AgentCore service logs and metrics. These appear as a unified view with tabs, providing a &quot;single pane of glass&quot; into the operational health of your platform.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-agentic-ai-observability-amazon-bedrock-agentcore/amazon-bedrock-agentcore-integration-dashboards-runtime-gateway-memory-identity.gif" alt="Amazon Bedrock AgentCore out-of-the-box Dashboards for Runtime, Gateway, Memory and Identity" /></p>
<p>This view is divided into four key zones, each addressing specific components of AgentCore - Runtime, Gateway, Memory, Identity. Note that note all agentic applications use all 4 components. In our example only the Customer Assistant uses all four components, whereas the Travel agent uses only Runtime. </p>
<p><strong>Runtime Health</strong></p>
<hr />
<p>Visualize agent invocations, session metrics, error trends (system vs. user), and performance stats like latency and throttling, split per endpoint. This dashboard helps you answer questions like</p>
<ul>
<li>&quot;How are my Travel Assistant agent and Customer Support agent performing in terms of overall traffic and latency, and are there any spikes in errors or throttling?&quot;</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-agentic-ai-observability-amazon-bedrock-agentcore/amazon-bedrock-agentcore-runtime-dashboard.jpg" alt="Amazon Bedrock AgentCore out-of-the-box Dashboard for AgentCore Runtime" /></p>
<p><strong>Gateway Performance</strong></p>
<hr />
<p>Analyze invocations across Lambda and MCP (Model Context Protocol), with detailed breakdowns for tool vs. non-tool calls. The dashboard highlights throttling detection, target execution times, and separates system errors from user errors.</p>
<ul>
<li><em>Question answered:</em> &quot;Are my external integrations (Lambda, MCP) performing efficiently, or are specific tool calls experiencing high latency, throttling, or system-level errors?&quot;</li>
</ul>
<p><strong>Memory Operations</strong></p>
<hr />
<p>Track core operations like event creation, retrieval, and listing, alongside deep dives into long-term memory processing. This includes extraction and consolidation metrics broken down by strategy type, as well as specific monitoring for throttling and system vs. user errors.</p>
<ul>
<li><em>Question answered:</em> &quot;Are failures in memory consolidation strategies or high retrieval latency preventing the agent from effectively recalling user context?&quot;</li>
</ul>
<p><strong>Identity &amp; Access</strong></p>
<hr />
<p>Monitor identity token fetch operations (workload, OAuth, API keys) and real-time authentication success/failure rates. The dashboard breaks down activity by provider and highlights throttling or capacity bottlenecks.</p>
<ul>
<li><em>Question answered:</em> &quot;Are authentication failures or token fetch bottlenecks from specific providers preventing agents from accessing required resources?&quot;</li>
</ul>
<h3>Out-of-the-Box (OOTB) Alert Templates</h3>
<p>Observability isn't just about looking at dashboards; it's about knowing when to act. To move from reactive checking to proactive monitoring, Elastic provides <strong>OOTB Alert Rule Templates</strong> (starting with Elastic version 9.2.1).</p>
<p>These templates eliminate guesswork by pre-selecting the optimal metrics to monitor and applying sensible thresholds. This configuration focuses on high-fidelity alerts for genuine anomalies, helping you catch critical issues early while minimizing alert fatigue.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-agentic-ai-observability-amazon-bedrock-agentcore/elastic-alert-rule-templates-for-amazon-bedrock-agentcore.jpg" alt="Amazon Bedrock AgentCore out-of-the-box Alert rule templates for AgentCore" /></p>
<p><strong>Suggested OOTB Alerts:</strong></p>
<ul>
<li>
<p><strong>Agent Runtime System Errors:</strong> Detects server-side errors (500 Internal Server Error) during agent runtime invocations, indicating infrastructure or service issues with AWS Bedrock AgentCore.</p>
</li>
<li>
<p><strong>Agent Runtime User Errors:</strong> Flags client-side errors (4xx) during agent runtime invocations, including validation failures (400), resource not found (404), access denied (403), and resource conflicts (409). This helps catch misconfigured permissions, invalid input, or missing resources early.</p>
</li>
<li>
<p><strong>Agent Runtime High Latency:</strong> Triggers when the average latency for agent runtime invocations exceeds 10 seconds (10,000ms). Latency measures the time elapsed between receiving a request and sending the final response token.</p>
</li>
</ul>
<h3> APM Tracing</h3>
<p>While logs and metrics tell you <em>that</em> an issue exists, <strong>APM Tracing</strong> tells you exactly <em>where</em> and <em>why</em> it is happening. By ingesting the OpenTelemetry signals from your instrumented agent, Elastic generates a detailed distributed trace (e.g. waterfall view) for every interaction. To get further details on LLM information such as prompts, responses, token usage, etc, you can explore the APM logs.  </p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-agentic-ai-observability-amazon-bedrock-agentcore/otel-native-strands-agent-traces-in-elastic-apm.jpg" alt="Amazon Bedrock AgentCore OTel-nativedistributed tracing waterfall diagram in Elastic APM" /></p>
<p>This allows you to peer inside the &quot;black box&quot; of the agent's execution flow:</p>
<ul>
<li>
<p><strong>Visualize the Chain of Thought:</strong> See the full sequence of events, from the user's initial prompt to the final response, including all intermediate reasoning steps.</p>
</li>
<li>
<p><strong>Pinpoint Tool Failures:</strong> Identify exactly which external tool (e.g., a Lambda function for flight booking or a knowledge base query) failed or timed out.</p>
</li>
<li>
<p><strong>Analyze Latency Contributors:</strong> Distinguish between latency caused by the LLM's generation time versus latency caused by slow downstream API calls.</p>
</li>
<li>
<p><strong>Debug with Context:</strong> Drill down into individual spans to see specific error messages, attributes, and metadata that explain why a particular step failed.</p>
</li>
</ul>
<h3>Conclusion</h3>
<p>As organizations move from experimental chatbots to complex, autonomous agents in production, the need for robust observability has never been greater. Agentic applications introduce new layers of complexity—non-deterministic behaviors, multi-step reasoning loops, and cost implications—that standard monitoring tools simply cannot see.</p>
<p>Elastic Agentic AI Observability for Amazon Bedrock AgentCore bridges this gap. By unifying platform-level health metrics from AgentCore with deep, transaction-level distributed tracing from OpenTelemetry, Elastic gives SREs and developers the complete picture. Whether you are debugging a failed tool call, optimizing latency, or controlling token costs, you have the visibility needed to run agentic AI with confidence.</p>
<p><strong>Complete Visibility: AgentCore + Amazon Bedrock:</strong> For the most comprehensive view, we recommend onboarding Elastic’s <a href="https://www.elastic.co/docs/reference/integrations/aws_bedrock"><strong>Amazon Bedrock</strong> integration</a> alongside AgentCore. While the AgentCore integration focuses on the orchestration layer—monitoring agent errors, tool latency, and invocations—the Bedrock integration provides deep visibility into the underlying foundation models themselves. This includes tracking model-specific latency, token usage, full prompts and responses, and even <strong>Guardrails</strong> usage and effectiveness. By combining both, you ensure complete coverage from the high-level agent workflow down to the raw model inference.</p>
<ul>
<li>
<p><strong>Read more:</strong><a href="https://www.elastic.co/observability-labs/blog/llm-observability-aws-bedrock"> Monitor Amazon Bedrock with Elastic</a></p>
</li>
<li>
<p><strong>Read more:</strong><a href="https://www.elastic.co/observability-labs/blog/llm-observability-amazon-bedrock-guardrails"> Amazon Bedrock Guardrails Observability</a></p>
</li>
</ul>
<p><strong>Get Started Today</strong> Ready to see your agents in action?</p>
<ul>
<li>
<p><strong>Try it out:</strong> Log in to <a href="https://cloud.elastic.co/login">Elastic Cloud</a> and add the Amazon Bedrock AgentCore integration. Or use <a href="https://aws.amazon.com/marketplace/seller-profile?id=d8f59038-c24c-4a9d-a66d-6711d35d7305">Elastic from Amazon Marketplace</a></p>
</li>
<li>
<p><strong>Explore the Code:</strong> Check out our GitHub repository for the <a href="https://github.com/elastic/observability-examples/tree/main/aws/amazon-bedrock-agentcore/travel_assistant">Travel assistant</a> which you saw in this blog, as well as the <a href="https://github.com/elastic/observability-examples/tree/main/aws/amazon-bedrock-agentcore/elastic_agentcore_sre_agent">AgentCore SRE Agent</a>.</p>
</li>
<li>
<p><strong>Learn More:</strong> Read the <a href="https://www.elastic.co/docs/reference/integrations/aws_bedrock_agentcore">full documentation</a> on setting up integration for Agentic AI Observability for Amazon Bedrock AgentCore.</p>
</li>
</ul>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/llm-agentic-ai-observability-amazon-bedrock-agentcore/agentcore-blog.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[LLM observability with Elastic: Taming the LLM with Guardrails for Amazon Bedrock]]></title>
            <link>https://www.elastic.co/observability-labs/blog/llm-observability-amazon-bedrock-guardrails</link>
            <guid isPermaLink="false">llm-observability-amazon-bedrock-guardrails</guid>
            <pubDate>Sun, 02 Mar 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Elastic’s enhanced Amazon Bedrock integration for Observability now includes Guardrails monitoring, offering real-time visibility into AI safety mechanisms. Track guardrail performance, usage, and policy interventions with pre-built dashboards. Learn how to set up observability for Guardrails and monitor key signals to strengthen safeguards against hallucinations, harmful content, and policy violations.]]></description>
            <content:encoded><![CDATA[<p>In a previous <a href="https://www.elastic.co/observability-labs/blog/llm-observability-aws-bedrock">blog</a> we showed you how to set up observability for your models hosted on Amazon Bedrock using Elastic’s integration. You can now effortlessly enable observability for your Amazon Bedrock guardrails using the enhanced <a href="https://www.elastic.co/guide/en/integrations/current/aws_bedrock.html">Elastic Amazon Bedrock integration</a>. If you previously onboarded the Amazon Bedrock integration, just upgrade it and you will automatically get all guardrails-related updates. The enhanced integration provides a single pane of glass dashboard with two panels - one focusing on overall Bedrock visualizations as well as a separate panel dedicated to Guardrails. You can now ingest and visualize metrics and logs specific to Guardrails, such as guardrail invocation count, invocation latency, text unit utilization, guardrail policy types associated with interventions and many more.</p>
<p>In this blog we will show you how to set up observability for Amazon Bedrock Guardrails, how you can make use of the enhanced dashboards and what key signals to alert on for an effective observability coverage of your Bedrock guardrails.</p>
<h2>Prerequisites</h2>
<p>To follow along with this blog, please make sure you have:</p>
<ul>
<li>An account on <a href="http://cloud.elastic.co/">Elastic Cloud</a> and a deployed stack in AWS (<a href="https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html">see instructions here</a>). Ensure you are using version 8.16.2 or higher. Alternatively, you can use <a href="https://www.elastic.co/cloud/serverless">Elastic Cloud Serverless</a>, a fully managed solution that eliminates infrastructure management, automatically scales based on usage, and lets you focus entirely on extracting value from your data.</li>
<li>An AWS account with permissions to pull the necessary data from AWS. See <a href="https://docs.elastic.co/en/integrations/aws#aws-permissions">details in our documentation</a>.</li>
</ul>
<h2>Steps to create a guardrail for Amazon Bedrock</h2>
<p>Before you set up observability for the guardrails, ensure that you have configured guardrails for your model. Follow the steps below to create an Amazon Bedrock Guardrail</p>
<ol>
<li><strong>Access the Amazon Bedrock Console</strong>
<ul>
<li>Sign in to the AWS Management Console with appropriate permissions and navigate to the Amazon Bedrock console.</li>
</ul>
</li>
<li><strong>Navigate to Guardrails</strong>
<ul>
<li>From the left-hand menu, select <strong>Guardrails</strong>.</li>
</ul>
</li>
<li><strong>Create a New Guardrail</strong>
<ul>
<li>Select <strong>Create guardrail</strong>.</li>
<li>Provide a descriptive name, an optional brief description, and specify a message to display when the guardrail blocks the user prompt.
<ul>
<li>Example: <em>Sorry, I am not configured to answer such questions. Kindly ask a different question.</em></li>
</ul>
</li>
</ul>
</li>
<li><strong>Configure Guardrail Policies</strong>
<ul>
<li><strong>Content Filters</strong>: Adjust settings to block harmful content and prompt attacks.</li>
<li><strong>Denied Topics</strong>: Specify topics to block.</li>
<li><strong>Word Filters</strong>: Define specific words or phrases to block.</li>
<li><strong>Sensitive Information Filters</strong>: Set up filters to detect and remove sensitive information.</li>
<li><strong>Contextual Grounding</strong>:
<ul>
<li>Configure the <strong>Grounding Threshold</strong> to set the minimum confidence level for factual accuracy.</li>
<li>Set the <strong>Relevance Threshold</strong> to ensure responses align with user queries.</li>
</ul>
</li>
</ul>
</li>
<li><strong>Review and Create</strong>
<ul>
<li>Review your settings and select <strong>Create</strong> to finalize the guardrail.</li>
</ul>
</li>
<li><strong>Create a Guardrail Version</strong>
<ul>
<li>In the <strong>Version</strong> section, select <strong>Create</strong>.</li>
<li>Optionally add a description, then select <strong>Create Version</strong>.</li>
</ul>
</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/guardrails-policy-configuration.png" alt="Amazon Bedrock Guardrails Policy Configurations" /></p>
<p>After creating a version of your guardrail, it's important to note down the <strong>Guardrail ID</strong> and the <strong>Guardrail Version Name</strong>. These identifiers are essential when integrating the guardrail into your application, as you'll need to specify them during guardrail invocation.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/guardrails-creation-confirmations.png" alt="Amazon Bedrock Guardrails Policy Version" /></p>
<h2>Example code to integrate with Amazon Bedrock guardrails</h2>
<p>Integrating Amazon Bedrock's ChatBedrock into your Python application enables advanced language model interactions with customisable safety measures. By configuring guardrails, you can ensure that the model adheres to predefined policies, preventing it from generating inappropriate or sensitive content.</p>
<p>The following code demonstrates how to integrate Amazon Bedrock with guardrails to enforce contextual grounding in AI-generated responses. It sets up a Bedrock client using AWS credentials, defines a reference grounding statement, and uses the ChatBedrock API to process user queries with contextual constraints. The <strong>converse_with_guardrails</strong> function sends a user query alongside a predefined grounding reference, ensuring that responses align with the provided knowledge source.</p>
<h3>Setting Up Environment Variables</h3>
<p>Before running the script, configure the required <strong>AWS credentials</strong> and <strong>guardrail settings</strong> as environment variables. These variables allow the script to authenticate with Amazon Bedrock and apply the necessary guardrails for safe and controlled AI interactions.</p>
<p>Create a <strong>.env</strong> file in the same directory as your script and add:</p>
<pre><code class="language-bash">AWS_ACCESS_KEY=&quot;your-access-key&quot; 
AWS_SECRET_KEY=&quot;your-secret-key&quot; 
AWS_REGION=&quot;your-aws-region&quot; 
GUARDRAIL_ID=&quot;your-guardrail-id&quot; 
GUARDRAIL_VERSION=&quot;your-guardrail-version&quot;
</code></pre>
<h3>Create a Python script and run</h3>
<p>Create a Python script using the code below and execute it to interact with the Amazon Bedrock Guardrails you set up.</p>
<pre><code class="language-python">import os
import boto3
from dotenv import load_dotenv
from langchain_aws import ChatBedrock
import json
from botocore.exceptions import ClientError

# Load environment variables
load_dotenv()

# Function to check for hallucinations using contextual grounding
def check_hallucination(response):
   output_assessments = response.get(&quot;trace&quot;, {}).get(&quot;guardrail&quot;, {}).get(&quot;outputAssessments&quot;, {})

   # Iterate over all assessments
   for key, assessments in output_assessments.items():
       for assessment in assessments:
           contextual_policy = assessment.get(&quot;contextualGroundingPolicy&quot;, {})
          
           if &quot;filters&quot; in contextual_policy:
               grounding = relevance = None
               grounding_threshold = relevance_threshold = None

               for filter_result in contextual_policy[&quot;filters&quot;]:
                   filter_type = filter_result.get(&quot;type&quot;)
                   if filter_type == &quot;RELEVANCE&quot;:
                       relevance = filter_result.get(&quot;score&quot;, 0)
                       relevance_threshold = filter_result.get(&quot;threshold&quot;, 0)
                   elif filter_type == &quot;GROUNDING&quot;:
                       grounding = filter_result.get(&quot;score&quot;, 0)
                       grounding_threshold = filter_result.get(&quot;threshold&quot;, 0)
          
           if relevance &lt; relevance_threshold or grounding &lt; grounding_threshold:
               return True, relevance, grounding, relevance_threshold, grounding_threshold  # Hallucination detected
  
   return False, relevance, grounding, relevance_threshold, grounding_threshold  # No hallucination detected

def converse_with_guardrails(bedrock_client, messages, grounding_reference):
   message = [
       {
           &quot;role&quot;: &quot;user&quot;,
           &quot;content&quot;: [
               {
                   &quot;guardContent&quot;: {
                       &quot;text&quot;: {
                           &quot;text&quot;: grounding_reference,
                           &quot;qualifiers&quot;: [&quot;grounding_source&quot;],
                       }
                   }
               },
               {
                   &quot;guardContent&quot;: {
                       &quot;text&quot;: {
                           &quot;text&quot;: messages,
                           &quot;qualifiers&quot;: [&quot;query&quot;],
                       }
                   }
               },
           ],
       }
   ]
   converse_config = {
       &quot;modelId&quot;: os.getenv('CHAT_MODEL'),
       &quot;messages&quot;: message,
       &quot;guardrailConfig&quot;: {
           &quot;guardrailIdentifier&quot;: os.getenv(&quot;GUARDRAIL_ID&quot;),
           &quot;guardrailVersion&quot;: os.getenv(&quot;GUARDRAIL_VERSION&quot;),
           &quot;trace&quot;: &quot;enabled&quot;
       },
       &quot;inferenceConfig&quot;: {
           &quot;temperature&quot;: 0.5       
       },
   }
   try:
       response = bedrock_client.converse(**converse_config)
       return response
   except ClientError as e:
       error_message = e.response['Error']['Message']
       print(f&quot;An error occurred: {error_message}&quot;)
       print(&quot;Converse config:&quot;)
       print(json.dumps(converse_config, indent=2))
       return None
  
def pretty_print_response(response, is_hallucination, relevance, relevance_threshold, grounding, grounding_threshold):
   print(&quot;\n&quot; + &quot;=&quot;*60)
   print(&quot; Guardrail Assessment&quot;)
   print(&quot;=&quot;*60)
   # Extract response message safely
   response_text = response.get(&quot;output&quot;, {}).get(&quot;message&quot;, {}).get(&quot;content&quot;, [{}])[0].get(&quot;text&quot;, &quot;N/A&quot;)
   print(&quot;\n **Model Response:**&quot;)
   print(f&quot;   {response_text}&quot;)
   print(&quot;\n **Guardrail Assessment:**&quot;)
   print(f&quot;   Is Hallucination : {is_hallucination}&quot;)
   print(&quot;\n **Contextual Grounding Policy Scores:**&quot;)
   print(f&quot;   - Relevance Score : {relevance:.2f} (Threshold: {relevance_threshold:.2f})&quot;)
   print(f&quot;   - Grounding Score : {grounding:.2f} (Threshold: {grounding_threshold:.2f})&quot;)
   print(&quot;\n&quot; + &quot;=&quot;*60 + &quot;\n&quot;)
  
def main():
   bs = boto3.Session(
       aws_access_key_id=os.getenv('AWS_ACCESS_KEY'),
       aws_secret_access_key=os.getenv('AWS_SECRET_KEY'),
       region_name=os.getenv('AWS_REGION')
   )

   # Initialize Bedrock client
   bedrock_client = bs.client(&quot;bedrock-runtime&quot;)

   # Grounding reference
   grounding_reference = &quot;The Wright brothers made the first powered aircraft flight on December 17, 1903.&quot;

   # User query
   user_query = &quot;Who were the first to fly an airplane?&quot;
  
   # Get model response
   response = converse_with_guardrails(bedrock_client, user_query, grounding_reference)

   # Check for hallucinations
   is_hallucination, relevance, grounding, relevance_threshold, grounding_threshold = check_hallucination(response)

   # Print the results
   pretty_print_response(response, is_hallucination, relevance, relevance_threshold, grounding, grounding_threshold)


if __name__ == &quot;__main__&quot;:
   main()
</code></pre>
<h3>Identifying Hallucinations with Contextual Grounding</h3>
<p>The contextual grounding feature proved effective in identifying potential hallucinations by comparing model responses against reference information. Relevance and grounding scores provided quantitative measures to assess the accuracy of model outputs.</p>
<p>The python script run output below demonstrates how the <strong>Grounding Score</strong> helps detect hallucinations:</p>
<pre><code>============================================================
 Guardrail Assessment
============================================================

 **Model Response:**
   Sorry, I am not configured to answer such questions. Kindly ask a different question.

 **Guardrail Assessment:**
   Is Hallucination : True

 **Contextual Grounding Policy Scores:**
   - Relevance Score : 1.00 (Threshold: 0.99)
   - Grounding Score : 0.03 (Threshold: 0.99)

============================================================
</code></pre>
<p>Here, the <strong>Grounding Score</strong> of <strong>0.03</strong> is significantly lower than the configured threshold of <strong>0.99</strong>, indicating that the response lacks factual accuracy. Since the score falls below the threshold, the system flags the response as a hallucination, highlighting the need to monitor guardrail outputs to ensure AI safety.</p>
<h2>Configuring Amazon Bedrock Guardrails Metrics &amp; Logs Collection</h2>
<p>Elastic makes it easy to collect both logs and metrics from Amazon Bedrock Guardrails using the Amazon Bedrock integration. By default, Elastic provides a curated set of logs and metrics, but you can customize the configuration based on your needs. The integration supports Amazon S3 and Amazon CloudWatch Logs for log collection, along with metrics collection from your chosen AWS region at a specified interval.</p>
<p>Follow these steps to enable the collection of metrics and logs:</p>
<ol>
<li>
<p><strong>Navigate to Amazon Bedrock Settings</strong> - In the AWS Console, go to <strong>Amazon Bedrock</strong> and open the <strong>Settings</strong> section.</p>
</li>
<li>
<p><strong>Choose Logging Destination</strong> - Select whether to send logs to <strong>Amazon S3</strong> or <strong>Amazon CloudWatch Logs</strong>.</p>
</li>
<li>
<p><strong>Provide Required Details</strong></p>
<ul>
<li><strong>If using Amazon S3</strong>, logs can be collected from objects referenced in <strong>S3 notification events</strong> (read from an SQS queue) or by <strong>direct polling</strong> from an S3 bucket.</li>
<li><strong>If using CloudWatch Logs</strong>: you need to create a <strong>CloudWatch log group</strong> and note its <strong>ARN</strong>, as this will be required for configuring both <strong>Amazon Bedrock</strong> and <strong>Elastic Amazon Bedrock integration</strong>.</li>
</ul>
</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/amazon-bedrock-settings-configuraiton.png" alt="Amazon Bedrock settings" /></p>
<ol start="4">
<li><strong>Configure Elastic's Amazon Bedrock integration</strong> - In <strong>Elastic</strong>, set up the <strong>Amazon Bedrock integration</strong>, ensuring the logging destination matches the one configured in <strong>Amazon Bedrock</strong>. Logs from your selected source and metrics from your AWS region will be collected automatically.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/amazon-bedrock-integrations-logs-config.png" alt="Amazon Bedrock integration logs configuration" /></p>
<ol start="5">
<li><strong>Accept Defaults or Customize Settings</strong> - Elastic provides a default configuration for logs and metrics collection. You can accept these defaults or adjust settings such as collection intervals to better fit your needs.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/amazon-bedrock-integrations-metrics-config.png" alt="Amazon Bedrock integration guardrails metrics configuration" /></p>
<h2>Understanding the pre-configured dashboard for Amazon Bedrock Guardrails</h2>
<p>You can access the Amazon Bedrock Guardrails dashboard using either of the following methods:</p>
<ol>
<li>
<p><strong>Navigate to the Dashboard Menu</strong>  - Select the <strong>Dashboard</strong> menu option in <strong>Elastic</strong> and search for <strong>[Amazon Bedrock] Guardrails</strong> to open the dashboard.</p>
</li>
<li>
<p><strong>Navigate to the Integrations Menu</strong>  - Open the <strong>Integrations</strong> menu in <strong>Elastic</strong>, select <strong>Amazon Bedrock</strong>, go to the <strong>Assets</strong> tab, and choose <strong>[Amazon Bedrock] Guardrails</strong> from the dashboard assets.</p>
</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/amazon-bedrock-guardrails-overview-dashboard.png" alt="Amazon Bedrock settings" /></p>
<p>The Amazon Bedrock Guardrails dashboard in the Elastic integration provides insights into guardrail performance, tracking total invocations, API latency, text unit usage, and intervention rates. It analyzes policy-based interventions, highlighting trends, text consumption, and frequently triggered policies. The dashboard also showcases instances where guardrails modified or blocked responses and offers a detailed breakdown of invocations by policy and content source.</p>
<h3>Guardrail invocation overview</h3>
<p>This dashboard section provides a comprehensive summary of key metrics related to guardrail performance and usage:</p>
<ul>
<li><strong>Total guardrails API invocations</strong>: Displays the overall count of times guardrails were invoked.</li>
<li><strong>Average Guardrails API invocation latency</strong>: Shows the average response time for guardrail API calls, offering insights into system performance.</li>
<li><strong>Total text unit utilization</strong>: Indicates the volume of text processed during guardrail invocations. For pricing of text units refer to Amazon Bedrock pricing page.</li>
<li><strong>Invocations - with and without guardrail interventions</strong>: A pie chart representation showing the distribution of LLM invocations based on guardrail activity. It displays the count of invocations where no guardrail interventions occurred, those where guardrails intervened and detected policy violations, and those where guardrails intervened but found no violations.</li>
</ul>
<p>These metrics help users evaluate guardrail effectiveness, track intervention patterns, and optimize configurations to ensure policy enforcement while maintaining system performance.</p>
<h3>Guardrail policy types for interventions</h3>
<p>This section provides a comprehensive view of guardrail policy interventions and their impact:</p>
<ul>
<li><strong>Interventions by Policy Type</strong>: Bar charts display the number of interventions applied to user inputs and model outputs, categorized by policy type (e.g., Contextual Grounding Policy, Word Policy, Content Policy, Sensitive Information Policy, Topic Policy).</li>
<li><strong>Text Unit Utilization by Policy Type</strong>: Panels highlight the text units consumed by various policy interventions, separately for user inputs and model outputs.</li>
<li><strong>Policy Usage Trends</strong>: A word cloud visualisation reveals the most frequently applied policy types, offering insights into intervention patterns.</li>
</ul>
<p>By analyzing intervention counts, text unit usage, and policy trends, users can identify frequently triggered policies, optimize guardrail settings, and ensure LLM interactions align with compliance and safety requirements.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/amazon-bedrock-guardrails-overview.png" alt="Amazon Bedrock Guardrails dashboard overview and policy types sections" /></p>
<h3>Prompt and response where guardrails intervened</h3>
<p>This dashboard section displays the original LLM prompt, inputs from various sources (API calls, applications, or chat interfaces), and the corresponding guardrail response. The text panel presents the prompt alongside the model's response after applying guardrail interventions. These interventions occur when input evaluation or model responses violate configured policies, leading to blocked or masked outputs.</p>
<p>The section also includes additional details to enhance visibility into how guardrails operate. It indicates whether a violation was detected, along with the violation type (e.g., <strong>GROUNDING</strong>, <strong>RELEVANCE</strong>) and the action taken (<strong>BLOCKED</strong>, <strong>NONE</strong>). For contextual grounding, the dashboard also shows the filter threshold, which defines the minimum confidence level required for a response to be considered valid, and the <strong>confidence score</strong>, which reflects how well the response aligns with the expected criteria.</p>
<p>By analyzing violations, actions taken, and confidence scores, users can adjust guardrail thresholds to balance blocking unsafe responses and allowing valid ones, ensuring optimal accuracy and compliance. This process is particularly crucial for detecting and mitigating hallucinations—instances where models generate information not grounded in source data. Implementing contextual grounding checks enables the identification of such ungrounded or irrelevant content, enhancing the reliability of applications like retrieval-augmented generation (RAG).</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/guardrails-intervened-logs.png" alt="Amazon Bedrock Guardrails logs where guardrails intervened" /></p>
<h3>Guardrail invocation by guardrail policy</h3>
<p>This section offers insights into the number of Guardrails API invocations, the overall latency, the total text units categorised by various guardrail policies (identified by guardrail ARN) and the policy versions.</p>
<h3>Guardrail invocation by content source (Input &amp; Output)</h3>
<p>This section provides a detailed overview of critical metrics related to guardrail performance and usage. It includes the total number of guardrail invocations, the count of intervention invocations where policies were applied, the volume of text units consumed during these interventions for both user inputs and model outputs and the average guardrail API invocation latency.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/guardrails-invocationby-policy-contentsource.png" alt="Amazon Bedrock Guardrails invocation by policy and content source" /></p>
<p>These insights help users understand how guardrails operate across different policies and content sources. By analyzing invocation counts, latency, and text unit consumption, users can assess policy effectiveness, track intervention patterns, and optimize configurations. Evaluating how guardrails interact with user inputs and model outputs ensures consistent enforcement, helping refine thresholds and improve compliance strategies.</p>
<h2>Configure SLOs and Alerts</h2>
<p>To create an SLO for monitoring <strong>contextual grounding accuracy</strong>, define a custom query SLI where <strong>good events</strong> are model responses that meet contextual grounding criteria, ensuring factual accuracy and alignment with the provided reference.</p>
<p>A suitable query for tracking good events is:</p>
<pre><code>gen_ai.prompt : &quot;*qualifiers[\\\&quot;grounding_source\\\&quot;]*&quot; and 
(gen_ai.compliance.violation_detected : false or 
not gen_ai.compliance.violation_detected : *)
</code></pre>
<p>The total query considers all relevant interactions having contextual grounding check is:</p>
<pre><code>gen_ai.prompt : &quot;*qualifiers[\\\&quot;grounding_source\\\&quot;]*&quot;
</code></pre>
<p>Set an <strong>SLO target of 99.5%</strong>, ensuring that the vast majority of responses remain factually grounded. This helps detect hallucinations and misaligned outputs in real-time. By continuously monitoring contextual grounding accuracy, you can proactively address inconsistencies, retrain models, or refine RAG pipelines before inaccuracies impact end users.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/slo-configurations.png" alt="SLO settings for Guardails metrics" /></p>
<p>Elastic's alerting capabilities enable proactive monitoring of key performance metrics. For instance, by setting up an alert on the <strong>average aws_bedrock.guardrails.invocation_latency</strong> with a <strong>500ms</strong> threshold, you can promptly identify and address performance bottlenecks, ensuring that policy enforcement remains efficient without causing unexpected delays.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/alert-configurations.png" alt="Alert settings for Guardails metrics" /></p>
<h2>Conclusion</h2>
<p>The Elastic Amazon Bedrock integration makes it easy for you to collect a curated set of metrics and logs for your LLM-powered applications using Amazon Bedrock including Guardrails. It comes with an out-of-the-box dashboard which you can further customize for your specific needs.</p>
<p>If you haven’t already done so, read our previous <a href="https://www.elastic.co/observability-labs/blog/llm-observability-aws-bedrock">blog</a> on what you can do with the Amazon Bedrock integration, set up guardrails for your Bedrock models, and enable the <a href="https://www.elastic.co/guide/en/integrations/current/aws_bedrock.html">Bedrock integration</a> to start observing your Bedrock models and guardrails today!</p>]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/llm-observability-amazon-bedrock-guardrails/llm-observability-aws-bedrock-illustration.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[LLM Observability with Elastic’s Azure AI Foundry Integration]]></title>
            <link>https://www.elastic.co/observability-labs/blog/llm-observability-azure-ai-foundry</link>
            <guid isPermaLink="false">llm-observability-azure-ai-foundry</guid>
            <pubDate>Fri, 25 Jul 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Gain comprehensive visibility into your generative AI workloads on Azure AI Foundry. Monitor token usage, latency, and cost, while leveraging built-in content filters to ensure safe and compliant application behavior—all with out-of-the-box observability powered by Elastic.]]></description>
            <content:encoded><![CDATA[<h2>Introduction</h2>
<p>As organizations increasingly adopt LLMs for AI-powered applications such as content creation, Retrieval-Augmented Generation (RAG), and data analysis, SREs and developers face new challenges. Tasks like monitoring workflows, analyzing input and output, managing query latency, and controlling costs become critical. LLM Observability helps address these issues by providing clear insights into how these models perform, allowing teams to quickly identify bottlenecks, optimize configurations, and improve reliability. With better observability, SREs can confidently scale LLM applications, especially on platforms like Azure AI Foundry, while minimizing downtime and keeping costs in check.</p>
<p>Elastic is expanding support for LLM Observability with Elastic Observability's new Azure AI Foundry integration. This is now available as a tech preview on Elastic Cloud. This new observability integration provides you with comprehensive visibility into the performance and usage of foundational models, such as <strong>GPT-4, Mistral, Llama</strong>, and thousands of others from leading AI companies and from Azure available through Azure AI Foundry. The new Azure AI Foundry Integration in Elastic Observability integration offers an out-of-the-box experience by simplifying the collection of metrics and logs, making it easier to gain actionable insights and effectively manage your models. The integration is simple to set up and comes with pre-built, out-of-the-box dashboards. With real-time insights, SREs can now monitor, optimize and troubleshoot LLM applications that are using Azure AI Foundry.</p>
<p>This blog will walk through the features available to SREs, such as monitoring invocations, errors, and latency information across various models, along with the usage and performance of LLM requests. Additionally, the blog will show how easy it is to set up and what insights you can gain from Elastic for LLM Observability.</p>
<h2>Prerequisites</h2>
<p>To get started with the Azure AI Foundry integration, you will need:</p>
<ul>
<li>An account on Elastic Cloud and a deployed stack in Azure (<a href="https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp?ocid=Elastic-Microsoft-Partner-Page-Get-Started">see instructions here</a>). Ensure you are using version 9.0.0 or higher.</li>
<li>An Azure account with permissions to pull the necessary data from Azure and Azure AI Foundry. See details in our <a href="https://www.elastic.co/docs/reference/integrations/azure_ai_foundry">documentation</a>.</li>
</ul>
<h2>Configuring Azure AI Foundry Integration</h2>
<p>To collect logs and metrics from Azure AI Foundry ensure you properly configure Azure logs and metrics from the following links:</p>
<ul>
<li>
<p><a href="https://www.elastic.co/docs/reference/integrations/azure_metrics#setup">Configure to receive Azure Metrics</a> - This integration specifically collects Azure AI Foundry metrics which will come from the service, and ensure you have the client id, subscription id, and tenant id from Azure AI Foundry to collect metrics.
<img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-ai-foundry/azure_ai_foundry_metrics.png" alt="Azure AI Foundry metrics" /></p>
</li>
<li>
<p><a href="https://www.elastic.co/docs/reference/integrations/azure">Configure to receive Azure Logs</a> and more specifically ensure that you <a href="https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-create">configure Azure event hub</a> to properly allow Elastic to ingest logs. Once you have the Azure event hub information, you will need it to configure the logs section of the Azure AI Foundry Integration.
<img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-ai-foundry/azure_ai_foundry_logs.png" alt="Azure AI Foundry logs" /></p>
</li>
</ul>
<h2>Maximize Visibility with Out-of-the-box dashboards</h2>
<p>Azure AI Foundry integration offers rich out-of-the-box visibility into the performance and usage information of models in Azure AI Foundry, including text and image models. There are several dashboards currently available. More will be coming as the integration goes to GA.</p>
<ul>
<li>Azure AI Foundry Overview dashboard provides a summarized view of the invocations, errors and latency information across various models.</li>
<li>Azure AI Foundry Billing dashboard - which provides total costs and daily usage costs from Azure cognitive services.</li>
<li>Azure AI Foundry Advanced Monitoring - which focuses on logs generated by the Azure AI Foundry service when connected through the API Management Service. Provides request rate, error rate, model usage, latency, LLM prompt input, response completion.</li>
</ul>
<p>Each dashboard provides specific insights important to SREs. Here is a quick overview of some of these insights:</p>
<ul>
<li>
<p><strong>Model Usage and Token Trends</strong> – Visualize token consumption and completion counts by model, endpoint, and time window.
<img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-ai-foundry/azure_ai_foundry_tokens.png" alt="Azure AI Foundry token usage metrics" /></p>
</li>
<li>
<p><strong>Latency Metrics</strong> – Monitor average and percentile latency per prompt, per endpoint, and correlate with prompt types or user IDs.
<img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-ai-foundry/azure_ai_foundry_model_latency.png" alt="Azure AI Foundry latency metrics" /></p>
</li>
<li>
<p><strong>Cost Estimation</strong> – Estimate API usage cost based on token consumption and model pricing.
<img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-ai-foundry/azure_ai_foundry_billing.png" alt="Azure AI Foundry cost estimation metrics" /></p>
</li>
<li>
<p><strong>Prompt/Completion Logging</strong> – View prompt-response pairs for debugging and quality monitoring.
<img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-ai-foundry/azure_ai_foundry_prompt_response.png" alt="Azure AI Foundry prompt/completions metrics" /></p>
</li>
<li>
<p><strong>Content Filtering and Guardrails</strong> – See which prompts or completions are being filtered, and why.
<img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-ai-foundry/azure_ai_foundry_guardrails.png" alt="Azure AI Foundry guardrails metrics" />
<img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-ai-foundry/azure_ai_foundry_prompt_filtered.png" alt="Azure AI Foundry guardrails prompt filtered" /></p>
</li>
</ul>
<p>You can drill into specific users or sessions, slice by model type or region, and export reports for usage reviews or compliance.</p>
<hr />
<h2>Try it out today</h2>
<p>The Azure AI Foundry Integration is currently available in Elastic Cloud (both serverless and hosted options). Sign up for a 7 day trial by signing up to Elastic Cloud directly or through Azure Marketplace.
Alternatively you can also deploy a cluster on our Elasticsearch Service, download the Elasticsearch stack, or run Elastic from Azure Marketplace then spin up the new technical preview of Azure AI Foundry integration, open the curated dashboards in Kibana and start monitoring your Azure AI Foundry service!</p>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-ai-foundry/LLM-observability.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Optimizing Spend and Content Moderation on Azure OpenAI with Elastic]]></title>
            <link>https://www.elastic.co/observability-labs/blog/llm-observability-azure-openai-content-filter</link>
            <guid isPermaLink="false">llm-observability-azure-openai-content-filter</guid>
            <pubDate>Tue, 13 May 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[We have added further capabilities to the Azure OpenAI GA package, which now offer content filter monitoring and enhancements to the billing insights!]]></description>
            <content:encoded><![CDATA[<p>In a previous blog we showed you how to set up observability for your models hosted on Azure OpenAI using Elastic’s integration. We’ve expanded the integration to also include Azure OpenAI content filtering, and cost analysis for Azure OpenAI. If you previously onboarded the Azure OpenAI integration, just upgrade it and you will automatically get all new features we discuss in this blog. The enhanced integration now provides multiple dashboards including a general Azure OpenAI Overview, Azure Provisioned Throughput Unit dashboard, Azure Content filtering, and a dashboard for Azure OpenAI billing.</p>
<p>In this blog we will cover how to use Azure OpenAI Content Filtering and tracking Azure OpenAI usage costs. Let’s first review what these two capabilities from Azure OpenAI enable you to do:</p>
<h2>Azure OpenAI Content Filtering: Enhancing AI Safety</h2>
<p>Content filtering for Azure OpenAI plays a critical role in addressing AI safety challenges by helping to mitigate the risks associated with harmful or inappropriate content generated by AI models. By implementing robust content filtering mechanisms, organizations can proactively identify and filter out potentially harmful content, such as hate speech, misinformation, or violent imagery, before it is disseminated to users. This helps prevent the spread of harmful content and reduces the potential negative impact on individuals and communities.</p>
<p>Monitoring Azure OpenAI content filtering is essential for staying proactive in addressing emerging content moderation challenges. By closely monitoring the system, businesses can quickly detect any new types of harmful content or patterns of misuse that may arise. This enables organizations to stay ahead of potential content moderation issues and take timely action to protect their users and uphold their brand reputation.</p>
<h2>Tracking Azure OpenAI Usage Costs</h2>
<p>Monitoring Azure OpenAI model usage costs is crucial for managing budget and resource allocation effectively. By keeping track of usage costs, organizations can optimize their operations to avoid unnecessary expenses and ensure that they are getting the best value from their investment in AI technologies. Additionally, it helps in forecasting future expenses and aids in scaling resources according to the demand without compromising performance or incurring excessive costs. Effective monitoring also allows for transparency and accountability, enabling better decision-making in terms of AI deployment and utilization within Azure environments.</p>
<p>As we walk through this blog, we will provide you with prerequisites to set up and use the pre-configured dashboards for both of these capabilities, which are part of the Azure OpenAI integration.</p>
<h2>Prerequisites</h2>
<p>In order to follow along in this blog you will have to</p>
<ol>
<li>
<p>Set up and install the Azure billing integration to monitor the usage costs. Once the integration is installed, you can track the usage in the enhanced Azure OpenAI Billing dashboard.</p>
</li>
<li>
<p>Additionally, make sure you have enabled the Azure API Management service to access the Azure OpenAI models.</p>
</li>
</ol>
<h3>How to Use Azure API Management with Azure OpenAI:</h3>
<ul>
<li><strong>Provision an Azure OpenAI resource:</strong> Create an Azure OpenAI resource and select a model for your application.</li>
<li><strong>Create an API Management instance:</strong> Establish an Azure API Management instance to manage the Azure OpenAI APIs.</li>
<li><strong>Import the Azure OpenAI API:</strong> Import the Azure OpenAI API into your API Management instance using its OpenAPI specification.</li>
<li><strong>Configure Policies:</strong> Implement policies in API Management to manage request authentication, rate limiting, traffic shaping, and more.</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-openai-content-filter/llm-observability-azure_openai_create_APM.png" alt="LLM Observability: Azure OpenAI Create API Management Service" /></p>
<h2>Steps to create a content filter for Azure OpenAI</h2>
<p>Before you set up observability for the content filtering, ensure that you have configured the Azure content filtering for your model. Follow the steps below to create an Azure OpenAI content filtering,</p>
<ol>
<li><strong>Access the Azure OpenAI service console:</strong>
<ul>
<li>Sign in to the Azure Console with the appropriate permissions and navigate to the Azure OpenAI service console.</li>
</ul>
</li>
<li><strong>Navigate to Safety + security:</strong>
<ul>
<li>From the left-hand menu, select <strong>Safety + security</strong>.</li>
</ul>
</li>
<li><strong>Create a New Content filter:</strong>
<ul>
<li>Select <strong>Create content filter</strong>.</li>
<li>Configure various content filter policies including the following
<ul>
<li><strong>Set input filter:</strong> Content will be annotated by category and blocked according to the threshold you set for prompts.</li>
<li><strong>Set output filter:</strong> Content will be annotated by category and blocked according to the threshold you set for response output.</li>
<li><strong>Blocklists:</strong> Define specific words or phrases to block.</li>
<li><strong>Deployments:</strong> Apply filters to model deployments.</li>
</ul>
</li>
</ul>
</li>
<li><strong>Review and Create:</strong>
<ul>
<li>Review your settings and select Create to finalize the content filter configurations.</li>
</ul>
</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-openai-content-filter/llm-observability-azure_openai_create_content_filter.png" alt="LLM Observability: Azure OpenAI Create Content Filter" /></p>
<p>Customers can also configure content filters and create custom safety policies that are tailored to their use case requirements. The configurability feature allows customers to adjust the settings, separately for prompts and completions, to filter content for each content category at different severity levels.</p>
<h2>Content filter types</h2>
<ul>
<li>The content filtering categories,
<ul>
<li>(hate, sexual, violence, self-harm)</li>
<li>Other optional classification models aimed at detecting jailbreak risk and known content for text and code.</li>
</ul>
</li>
<li>Severity level within each content filter category,
<ul>
<li>(low, medium, high)</li>
<li>Content detected at the 'safe' severity level is labeled in annotations but isn't subject to filtering and isn't configurable.</li>
</ul>
</li>
</ul>
<h2>Understanding the pre-configured dashboard for Azure OpenAI Content Filtering</h2>
<p>Now that you have set up the filter, you can see what is being filtered in Elastic through the Azure OpenAI content filtering dashboard.</p>
<ol>
<li>Navigate to the Dashboard Menu – Select the <strong>Dashboard</strong> menu option in Elastic and search for <strong>[Azure OpenAI] Content Filtering Overview</strong> to open the dashboard.</li>
<li>Navigate to the Integrations Menu – Open the <strong>Integrations</strong> menu in Elastic, select <strong>Azure OpenAI</strong>, go to the <strong>Assets</strong> tab, and choose <strong>[Azure OpenAI] Content Filtering Overview</strong> from the dashboard assets.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-openai-content-filter/llm-observability-azure_openai_content_filter_overview.png" alt="LLM Observability: Azure OpenAI Content Filtering Overview" /></p>
<p>The Azure OpenAI Content Filtering Overview dashboard in the Elastic integration provides insights into blocked requests, API latency, error rates. This dashboard also provides detailed breakdown of content being filtered by the content filtering policy.</p>
<h2>Content Filter overview</h2>
<p>When the content filtering system detects harmful content, you receive either an error on the API call if the prompt was deemed inappropriate, or the finish_reason on the response will be content_filter to signify that some of the completion was filtered.</p>
<p>This can be summarized as,</p>
<ul>
<li>
<p><strong>Prompt filters:</strong> The prompt content that is classified in the filtered category will return HTTP 400 error.</p>
</li>
<li>
<p><strong>Non-streaming completion:</strong> When the content is filtered, non-streaming completions calls won't return any content. In rare cases with longer responses, a partial result can be returned. In these cases, the finish_reason is updated.</p>
</li>
<li>
<p><strong>Streaming completion:</strong> For streaming completions calls, segments are returned back to the user as they're completed. The service continues streaming until either reaching a stop token, length, or when content that is classified at a filtered category and severity level is detected.</p>
</li>
</ul>
<h2>Prompt and response where content has been blocked</h2>
<p>This dashboard section displays the original LLM prompt, inputs from various sources (API calls, applications, or chat interfaces), and the corresponding completion response. The panel below gives a view on the responses after applying content filtering policy for prompts and completions.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-openai-content-filter/llm-observability-azure_openai_content_filter_logs.png" alt="LLM Observability: Azure OpenAI Content Filtered Logs" /></p>
<p>You can use the following code snippet  to start integrating your current prompt and settings into your application to test the content filter:</p>
<pre><code>chat_prompt = [
   {
       &quot;role&quot;: &quot;user&quot;,
       &quot;content&quot;: &quot;How to kill a mocking bird?&quot;
   }
]
</code></pre>
<p>After running the code, you can find the content being filtered by violence category with the severity level medium.
<img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-openai-content-filter/llm-observability-azure_openai_content-filter_response.png" alt="LLM Observability: Azure OpenAI Content Filtered Response" /></p>
<h2>Content filtered by content source (Input &amp; Output)</h2>
<p>The content filtering system helps monitor and moderate different categories of content based on severity levels. The categories typically include things like adult content, offensive language, hate speech, violence, and more. The severity levels indicate the degree of sensitivity or potential harm associated with the content. This panel helps the user to effectively monitor and filter out inappropriate or harmful content to maintain a safe environment.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-openai-content-filter/llm-observability-azure_openai_content_filter_category_serverity.png" alt="LLM Observability: Azure OpenAI Content Filter Category &amp; Severity Level" /></p>
<p>These metrics can be categorized into the following groups:</p>
<ul>
<li><strong>Blocked requests by category:</strong> Provides insights into the total blocked requests by category.</li>
<li><strong>Severity distribution by categories:</strong> Monitors the blocked requests by categories and severity distribution. The severity distribution may be either low, medium or high.</li>
<li><strong>Content filtered categories:</strong> Provides insights into the content filtered categories over time.</li>
</ul>
<h2>Reviewing the Azure OpenAI Billing dashboard</h2>
<p>You can now look at what you are spending on Azure OpenAI.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-openai-content-filter/llm-observability-azure_openai_billing.png" alt="LLM Observability: Azure OpenAI Billing" /></p>
<p>Here is what you see on this dashboard:</p>
<ul>
<li><strong>Total costs:</strong> This measures the total usage cost across all the model deployments.</li>
<li><strong>Overall Usage by model:</strong> This tracks the total usage costs broken down by model.</li>
<li><strong>Daily usage:</strong> Monitors usage costs on a daily basis.</li>
<li><strong>Daily usage costs by model:</strong> Monitors daily usage costs broken down by model deployments.</li>
</ul>
<h2>Conclusion</h2>
<p>The Azure OpenAI integration makes it easy for you to collect a curated set of metrics and logs for your LLM-powered applications using Azure OpenAI along with content filtered responses. It comes with an out-of-the-box dashboard which you can further customize for your specific needs.</p>
<p>Deploy a cluster on our Elasticsearch Service or download the stack, spin up the new Azure OpenAI integration, open the curated dashboards in Kibana and start monitoring your Azure OpenAI service!</p>]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/llm-observability-azure-openai-content-filter/LLM-observability.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[End to end LLM observability with Elastic: seeing into the opaque world of generative AI applications]]></title>
            <link>https://www.elastic.co/observability-labs/blog/llm-observability-elastic</link>
            <guid isPermaLink="false">llm-observability-elastic</guid>
            <pubDate>Wed, 02 Apr 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Elastic’s LLM Observability delivers end-to-end visibility into the performance, reliability, cost, and compliance of LLMs across Amazon Bedrock, Azure OpenAI, Google Vertex AI, and OpenAI, empowering SREs to optimize and troubleshoot AI-powered applications.]]></description>
            <content:encoded><![CDATA[<p>In the ever-evolving landscape of artificial intelligence, Large Language Models (LLMs) stand as beacons of innovation, offering unprecedented capabilities across industries. From generating human-like text and translating languages to providing personalized customer interactions, the possibilities with LLMs are vast and increasingly indispensable. Enterprises are deploying these models for everything, from automating customer support systems to enhancing creative writing processes. Imagine a virtual assistant not only answering questions but also drafting business proposals or a customer service bot that understands and responds with empathy—all powered by LLMs. However, with great power comes the need for great oversight.</p>
<p>Despite the transformative potential, LLMs introduce complex challenges that necessitate a new level of observability as LLMs are notoriously opaque. Enter LLM observability: a crucial component in the lifecycle management of LLMs. This aspect becomes vital for Service Reliability Engineers (SREs) and other key stakeholders tasked with ensuring seamless, error-free operations, cost control, and minimizing the risks associated with the unpredictable nature of LLM generated responses. SREs need insights into performance metrics, error frequencies, latency issues, the cost implications of running these sophisticated models, and the prompt and response exchange with the model. Traditional monitoring tools fall short in this high-stakes environment; what’s needed is a nuanced approach to address the unique observability demands that LLMs introduce.</p>
<h3>Elastic's LLM Observability Capabilities Address These Challenges</h3>
<p>With Elastic’s end-to-end LLM observability you can cover a wide range of use cases. To achieve this, you can onboard two types of integrations - API-based logs and metrics and via APM instrumentation. Depending on your use case, you can also choose to use of the LLM integrations.</p>
<ol>
<li>
<p><strong>High level overview</strong>: via API-based logs and metrics. Monitoring LLM services from providers by ingesting a curated set of service metrics and logs like latency, invocation frequency, tokens, errors, and prompts and responses. Each LLM integration comes with out-of-the-box dashboards.</p>
</li>
<li>
<p><strong>Troubleshooting applications</strong>: via APM instrumentation. Fully OTel-native tracing and auto-instrumentation for LLM-based applications through Elastic Distributions of OpenTelemetry (EDOT). Additionally, you can use third party libraries (Langtrace, OpenLit, OpenLLMetry) together with Elastic to extend the coverage to additional LLM-related technologies. </p>
</li>
</ol>
<h4>High level overview: LLM Observability for Leading Providers</h4>
<p>Elastic offers tailored API-based integrations for four major LLM hosting providers:</p>
<ul>
<li>
<p>Azure OpenAI</p>
</li>
<li>
<p>OpenAI</p>
</li>
<li>
<p>Amazon Bedrock</p>
</li>
<li>
<p>Google Vertex AI</p>
</li>
</ul>
<p>These integrations bring a curated set of logs and metrics collection tailored to each provider. What this means for SREs is straightforward access to pre-configured dashboards that highlight the prompts and responses, usage patterns, performance metrics, and cost details across different models and providers.</p>
<p>For instance, SREs keen on identifying which LLM generates the most errors or insights about the models in terms of latency, cost, or usage frequency can leverage these integrations. Imagine having the capability to instantly visualize which LLM is slowing down processes or incurring high costs, thus enabling data-driven decisions to optimize operations.</p>
<h4>Troubleshooting applications: Tracing and Auto-Instrumentation of OpenAI, Amazon Bedrock and Google Vertex AI models</h4>
<p>Elastic supports OTLP tracing capabilities in EDOT for applications using OpenAI models and models hosted on Amazon Bedrock and Google Vertex AI. In addition, Elastic also supports LLM tracing from third party libraries (Langtrace, OpenLIT, OpenLLMetry). </p>
<p>Tracing offers a comprehensive map of an application's request flow, pinpointing granular details about each call within the system. For each transaction and span of a request, tracing shows critical information such as specific models utilized, request duration, errors encountered, tokens used per request, and the prompts and responses between the LLM.</p>
<p>Tracing helps SREs troubleshoot performance issues with applications developed in languages like Python, Node.js and Java.&quot; If an SRE needs to investigate latency or error issues, LLM tracing provides a zoomed-in view into the request lifecycle and allows for profound insights into whether a delay is application-specific, model-specific or systemic across deployments.</p>
<h3>Use Cases: Bringing Elastic's Observability Features to Life</h3>
<p>Let’s explore some practical scenarios where Elastic’s observability tools shine:</p>
<h4>1. Understanding LLM Performance and Reliability</h4>
<p>An SRE team looking to optimize a customer support system powered by Azure OpenAI can utilize Elastic’s <a href="https://www.elastic.co/guide/en/integrations/current/azure_openai.html">Azure OpenAI integration</a> to quickly ascertain which model variants incur higher latency or error rates. This enhances decision-making regarding model deployment or even switching providers based on performance metrics.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-elastic/Azure-OpenAI.png" alt="Azure OpenAI" /></p>
<p>Similarly SREs can also use in parallel integrations for <a href="https://www.elastic.co/guide/en/integrations/current/gcp_vertexai.html">Google Vertex AI</a>, <a href="https://www.elastic.co/guide/en/integrations/current/aws_bedrock.html">Amazon Bedrock</a>, and <a href="https://www.elastic.co/guide/en/integrations/current/openai.html">OpenAI</a> for other applications using models hosted on these providers.</p>
<h4>2. Troubleshooting OpenAI-Powered Applications</h4>
<p>Consider an enterprise utilizing an OpenAI model for real-time user interactions. Encountering unexplained delays, an SRE can use OpenAI tracing to dissect the transaction pathway, identifying if one specific API call or model invocation is the bottleneck. The SRE can also check the out-of-the-box OpenAI integration dashboard to verify if the latency is only affecting this application or all model invocations across the organization.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-elastic/OpenAI-tracing.png" alt="OpenAI Tracing" /></p>
<p>An engineer troubleshooting the LLM-based application can also check to see what were the prompt and response exchanges with the LLM during this request so they can rule out possible impact on performance due to the input.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-elastic/OpenAI-trace.png" alt="OpenAI Trace sample with logs " /></p>
<h4>3. Addressing Cost and Usage Concerns</h4>
<p>SREs are generally acutely aware of which LLM configurations are less cost-effective than required. Elastic’s integration dashboards, pre-configured to display model usage patterns, help mitigate unnecessary spending effectively. You can find out-of-the box dashboards for Azure OpenAI, OpenAI, Amazon Bedrock, and Google VertexAI models. These dashboards show key cost and usage information such as total invocations and tokens, as well as time series breakdown by model and endpoint. In addition, some integrations show more advanced usage information such as provisioned throughput units (PTU) as well as billing cost.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-elastic/GCP-Vertex-AI.png" alt="GCP Vertex AI" /></p>
<h4>4. Understanding LLM Compliance </h4>
<p>With the Elastic Amazon Bedrock integration for Guardrails, and Azure OpenAI integration for content filtering, SREs can swiftly address security concerns, like verifying if certain user interactions prompt policy violations. Elastic's observability logs clarify whether guardrails rightly blocked potentially harmful responses, bolstering compliance assurance.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-elastic/Bedrock-Guardrails.png" alt="Bedrock-Guardrails.png" /></p>
<h3>Conclusion</h3>
<p>As LLMs continue to revolutionize the capabilities of modern applications, the role of observability becomes increasingly paramount. Elastic’s comprehensive observability framework empowers enterprises to harness the full potential of LLMs while maintaining robust operational insight and control. The integration with prominent LLM hosting providers and advanced tracing for OpenAI, Amazon Bedrock and Google Vertex AI models, equips SREs with the necessary arsenal to navigate the complex landscape of LLM-driven applications, ensuring they remain safe, reliable, efficient, and cost-effective.</p>
<p>In this new era of AI, balancing innovation with observability isn't just beneficial—it's essential. Whether optimizing performance, troubleshooting intricacies, or managing costs and compliance, Elastic stands at the forefront, ensuring your LLM journey is as seamless as it is groundbreaking.</p>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/llm-observability-elastic/llm-e2e.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[LLM observability: track usage and manage costs with Elastic's OpenAI integration]]></title>
            <link>https://www.elastic.co/observability-labs/blog/llm-observability-openai</link>
            <guid isPermaLink="false">llm-observability-openai</guid>
            <pubDate>Tue, 11 Mar 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Elastic's new OpenAI integration for Observability provides comprehensive insights into OpenAI model usage. With our pre-built dashboards and metrics, you can effectively track and monitor OpenAI model usage including GPT-4o and DALL·E.]]></description>
            <content:encoded><![CDATA[<p>In an era where AI-driven applications are becoming ubiquitous, understanding and managing the usage of language models is crucial. OpenAI has been at the forefront of developing advanced language models that power a multitude of applications, from chatbots to code generation. However, as applications grow in complexity and scale, observing crucial metrics that ensure optimal performance and cost-effectiveness becomes essential. Specific needs arise in areas such as performance and reliability monitoring, and cost management, which are pivotal for maximizing the potential of language models.</p>
<p>As organizations adopt OpenAI's diverse AI models, including language models like GPT-4o and GPT-3.5 Turbo, image models like DALL·E, and audio models like Whisper, comprehensive usage monitoring is crucial to track and optimize performance, reliability, usage and cost of each model.</p>
<p>Elastic's new <a href="https://www.elastic.co/guide/en/integrations/current/openai.html">OpenAI integration</a> offers a solution to the challenges faced by developers and businesses using these models. It is designed to provide a unified view of your OpenAI usage across all model types.</p>
<h3>Key benefits of the OpenAI integration</h3>
<p>OpenAI's usage-based pricing model applies across all these services, making it essential to track consumption and identify which models are being used to control costs and optimize deployments. The new OpenAI integration by Elastic utilizes the <a href="https://platform.openai.com/docs/api-reference/usage">OpenAI Usage API</a> to track consumption and identify specific models being used. It offers an out-of-the-box experience with pre-built dashboards, simplifying the process of monitoring your usage patterns.</p>
<p>Continue reading to learn about what you will get with the integration. We'll also show you the setup process, how to leverage the pre-built dashboards, and what insights you can gain from Elastic for LLM Observability.</p>
<h2>Setting up the OpenAI Integration</h2>
<h3>Prerequisites</h3>
<p>To follow along with this blog, you will need:</p>
<ul>
<li>An Elastic cloud account (version 8.16.3 or higher). Alternatively, you can use <a href="https://www.elastic.co/cloud/serverless">Elastic Cloud Serverless</a>, a fully managed solution that eliminates infrastructure management, automatically scales based on usage, and lets you focus entirely on extracting value from your data.</li>
<li>An OpenAI account with an <a href="https://platform.openai.com/docs/api-reference/admin-api-keys">Admin API key</a>.</li>
<li>Applications that use the OpenAI APIs.</li>
</ul>
<h3>Generating sample OpenAI usage data</h3>
<p>If you're new to OpenAI and eager to try this integration, you can quickly set it up and populate your dashboards with sample data. You'll just need to generate some usage by interacting with the OpenAI API. If you don't have an OpenAI API key, you can create one <a href="https://platform.openai.com/api-keys">here</a>. For more information on authentication, refer to the OpenAI <a href="https://platform.openai.com/docs/api-reference/authentication">documentation</a>.</p>
<p>The OpenAI documentation provides detailed examples for each of their API endpoints. Here are direct links to the relevant sections for generating sample usage data:</p>
<ul>
<li>Language models (completions): Use the Chat Completions API to generate text. See the examples <a href="https://platform.openai.com/docs/api-reference/chat/create">here</a>.</li>
<li>Audio models (text-to-speech): Generate audio from text using the Speech API. See the examples <a href="https://platform.openai.com/docs/api-reference/audio/createSpeech">here</a>.</li>
<li>Audio models (speech-to-text): Transcribe audio to text using the Transcriptions API. See the examples <a href="https://platform.openai.com/docs/api-reference/audio/createTranscription">here</a>.</li>
<li>Embeddings: Generate vector representations of text using the Embeddings API. See the examples <a href="https://platform.openai.com/docs/api-reference/embeddings">here</a>.</li>
<li>Image models: Create images from text prompts using the Image Generation API. See the examples <a href="https://platform.openai.com/docs/api-reference/images/create">here</a>.</li>
<li>Moderation: Check the contents with Moderation API. See the examples <a href="https://platform.openai.com/docs/api-reference/moderations">here</a>.</li>
</ul>
<p>There are more endpoints that you can explore to generate sample usage data.</p>
<p>After running these examples (using your API key), remember that the OpenAI <a href="https://platform.openai.com/docs/api-reference/usage">Usage API</a> has a delay. It may take some time (usually a few minutes) for the usage data to appear in your dashboard.</p>
<h3>Configuration</h3>
<p>To connect the OpenAI integration to your OpenAI account, you'll need your OpenAI's <a href="https://platform.openai.com/settings/organization/admin-keys">Admin API key</a>. The integration will use this key to periodically retrieve usage data from the OpenAI <a href="https://platform.openai.com/docs/api-reference/usage">Usage API</a>.</p>
<p>The integration supports eight distinct <a href="https://www.elastic.co/guide/en/integrations/current/openai.html#openai-data-streams">data streams</a>, corresponding to different categories of OpenAI API usage:</p>
<ul>
<li>Audio speeches (text-to-speech)</li>
<li>Audio transcriptions (speech-to-text)</li>
<li>Code interpreter sessions</li>
<li>Completions (language models)</li>
<li>Embeddings</li>
<li>Images</li>
<li>Moderations</li>
<li>Vector stores</li>
</ul>
<p>By default, all data streams are enabled. However, you can disable any data streams that are not relevant to your usage. All enabled data streams are visualized in a single, comprehensive dashboard, providing a unified view of your usage.</p>
<p>For advanced users, the integration offers additional configuration options, including setting the bucket width and initial interval. These options are documented in detail in the official integration <a href="https://www.elastic.co/guide/en/integrations/current/openai.html#openai-collection-behavior">documentation</a>.</p>
<h2>Maximize visibility with the out-of-the-box dashboard</h2>
<p>You can access the OpenAI dashboard in two ways:</p>
<ol>
<li>Navigate to the Dashboards menu in the left side panel and search for &quot;OpenAI&quot;. In the search results select  <strong>[Metrics OpenAI] OpenAI Usage Overview</strong> to open the dashboard.</li>
<li>Alternatively, navigate to the Integrations Menu — Open the <strong>Integrations</strong> menu under the <strong>Management</strong> section in Elastic, select <strong>OpenAI</strong>, go to the <strong>Assets</strong> tab, and choose <strong>[Metrics OpenAI] OpenAI Usage Overview</strong> from the dashboards assets.</li>
</ol>
<h3>Understanding the pre-configured dashboard for OpenAI</h3>
<p>The pre-built dashboard provides a structured view of OpenAI's API consumption, displaying key metrics such as token usage, API call distribution, and model-wise invocation counts. It highlights top-performing projects, users, and API keys, along with breakdowns of image generation, audio transcription, and text-to-speech usage. By analyzing these insights, users can track usage patterns, and optimize AI-driven applications.</p>
<h3>OpenAI usage metrics overview</h3>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/dashboard-overview.png" alt="LLM Observability: OpenAI usage metrics overview" /></p>
<p>This dashboard section shows key usage metrics from OpenAI, including invocation rates, token usage, and the top-performing models. It also highlights the total number of invocations and tokens and the invocation count by object type. Understanding these insights can help users optimize model usage, reduce costs, and enhance efficiency when integrating AI models into their applications.</p>
<h3>Top performing Project, User, and API Key IDs</h3>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/dashboard-top-tables.png" alt="LLM Observability: Top performing Project, User, and API Key IDs" /></p>
<p>Here, you can analyze the top Project IDs, User IDs, and API Key IDs based on invocation counts. This data provides valuable insights to help organizations track usage patterns across different projects and applications.</p>
<h3>Token metrics</h3>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/dashboard-token-metrics.png" alt="LLM Observability: Token metrics" /></p>
<p>In this dashboard section you can see token usage trends across various models. This can help you analyze trends across input types (e.g., audio, embeddings, moderations), output types (e.g., audio), and input cached tokens. This information can help developers fine-tune their prompts and optimize token consumption.</p>
<h3>Image generation metrics</h3>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/dashboard-image-metrics.png" alt="LLM Observability: Image generation metrics" /></p>
<p>AI-generated images are becoming increasingly popular across industries. This section provides an overview of image generation metrics, including invocation rates by model and the most <a href="https://platform.openai.com/docs/guides/images#size-and-quality-options">common output dimensions</a>. These insights help assess invocation costs and analyze image generation usage.</p>
<h3>Audio transcription metrics</h3>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/dashboard-audio-transcription-metrics.png" alt="LLM Observability: Audio transcription metrics" /></p>
<p>OpenAI's AI-powered transcription services make speech-to-text conversion easier than ever. This section tracks audio transcription metrics, including invocation rates and total transcribed seconds per model. Understanding these trends can help businesses optimize costs when building audio transcription-based applications.</p>
<h3>Audio speech metrics</h3>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/dashboard-audio-speech.png" alt="LLM Observability: Audio speech metrics" /></p>
<p>OpenAI's text-to-speech (TTS) models deliver realistic voice synthesis for applications such as accessibility tools and virtual assistants. This section explores TTS invocation rates and the number of characters synthesized per model, offering insights into the adoption of AI-driven voice synthesis.</p>
<h2>Creating Alerts and SLOs to monitor OpenAI</h2>
<p>As with every other Elastic integration, all the logs and metrics information is fully available to leverage in every capability in <a href="https://www.elastic.co/observability">Elastic Observability</a>, including <a href="https://www.elastic.co/guide/en/observability/current/slo.html">SLOs</a>, <a href="https://www.elastic.co/guide/en/observability/current/create-alerts.html">alerting</a>, custom <a href="https://www.elastic.co/guide/en/kibana/current/dashboard.html">dashboards</a>, in-depth <a href="https://www.elastic.co/guide/en/observability/current/monitor-logs.html">logs exploration</a>, etc.</p>
<p>To proactively manage your OpenAI token usage and avoid unexpected costs, <a href="https://www.elastic.co/guide/en/observability/current/create-alerts-rules.html">create</a> a custom threshold rule in Observability Alerts.</p>
<p><em>Example</em>: Target the relevant data stream, and configure the rule to sum the related tokens field (along with other token-related fields, if applicable). Set a threshold representing your desired usage limit, and the alert will notify you if this limit is exceeded within a specified timeframe, such as daily or hourly.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/dashboard-create-alert.png" alt="LLM Observability: Alert creation" /></p>
<p>When an alert condition is met, the Alert Details view linked in the alert notification for that alert provides detailed insights surrounding the violation, such as when the violation started, its current status, and any previous history of similar violations, enabling proactive issue resolution, and improving system resilience.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/dashboard-alert-overview.png" alt="LLM Observability: Alert overview" /></p>
<p><em>Example</em>: To create an SLO that monitors model distribution in OpenAI, start by defining a custom metric SLI definition, adding good events where <code>openai.base.model</code> contains <code>gpt-3.5*</code> and total events encompassing all OpenAI requests, grouped by <code>openai.base.project_id</code> and <code>openai.base.user_id</code>. Then, set an appropriate SLO target such as 80% and monitor this over a 7-day rolling window to identify projects and users that may be overusing more expensive models.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/dashboard-create-slo.png" alt="LLM Observability: SLO creation" /></p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/dashboard-slo-overview.png" alt="LLM Observability: SLO overview" /></p>
<p>You can now track the distribution of requests across different OpenAI models by project and user. This example demonstrates how Elastic's OpenAI integration helps you optimize costs. By monitoring the percentage of requests handled by cost-efficient GPT-3.5 models — the SLI — against the 80% target (part of the SLO), you can quickly identify which specific projects or users are driving up costs through excessive usage of models like GPT-4-turbo, GPT-4o, etc. This visibility enables targeted optimization strategies, ensuring your AI initiatives remain cost-effective while still leveraging advanced capabilities.</p>
<h2>Conclusion, next steps and further reading</h2>
<p>You now know how Elastic's OpenAI integration provides an essential tool for anyone relying on OpenAI's models to power their applications. By offering a comprehensive and customizable dashboard, this integration empowers SREs and developers to effectively monitor performance, manage costs, and optimize your AI systems effortlessly. Now, it's your turn to onboard this application following the instructions in this blog and start monitoring your OpenAI usage! We'd love to hear from you on how you get on and always welcome ideas for enhancements.</p>
<p>To learn how to set up Application Performance Monitoring (APM) tracing of OpenAI-powered applications, read this <a href="https://www.elastic.co/observability-labs/blog/elastic-opentelemetry-openai">blog</a>. For further reading and more LLM observability use cases, explore Elastic's observability lab blogs <a href="https://www.elastic.co/observability-labs/blog/tag/llmobs">here</a>.</p>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/llm-observability-openai/llm-observability-openai.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Transforming Industries and the Critical Role of LLM Observability: How to use Elastic's LLM integrations in real-world scenarios]]></title>
            <link>https://www.elastic.co/observability-labs/blog/transforming-industries-and-the-critical-role-of-llm-observability</link>
            <guid isPermaLink="false">transforming-industries-and-the-critical-role-of-llm-observability</guid>
            <pubDate>Thu, 08 May 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[This blog explores four industry specific use cases that use Large Language Models (LLMs) and highlights how Elastic's LLM observability integrations provide insights into the cost, performance, reliability and the prompts and response exchange with the LLM.]]></description>
            <content:encoded><![CDATA[<p>In today's tech-centric world, Large Language Models (LLMs) are transforming sectors from finance and healthcare to research. LLMs are starting to underpin products and services across the spectrum. Take for example recent <a href="https://blog.google/technology/google-deepmind/gemini-model-thinking-updates-march-2025/#advanced-coding">advanced coding</a> developments in Google's Gemini 2.5 which enable it to use its reasoning capabilities to create a video game by producing the executable code from a short prompt.  Or <a href="https://www.aboutamazon.com/news/devices/new-alexa-generative-artificial-intelligence">new ways</a> to interact with Amazon's Alexa - for example, you could send a picture of a live music schedule, and have Alexa add the details to your calendar. And let's not forget Microsoft's <a href="https://blogs.microsoft.com/blog/2025/04/04/your-ai-companion/">personalization of Copilot</a> which remembers what you talk about, so it learns your likes and dislikes and details about your life; the name of your dog, that tricky project at work, what keeps you motivated to stick to your new workout routine.</p>
<p>Despite their widespread utility of LLMs, deploying these sophisticated tools in real-world scenarios poses distinct challenges, especially in managing their complex behaviors. For users such as Site Reliability Engineers (SREs), DevOps teams, and AI/ML engineers, ensuring reliability, performance, and compliance of these models introduces an additional  layer of complexity. This is where the concept of LLM Observability becomes essential. It offers crucial insights into the performance of these models, ensuring that these advanced AI systems operate both effectively and ethically.</p>
<h3>Why LLM Observability Matters and How Elastic Makes It Easy</h3>
<p>LLMs are not just another piece of software; they are sophisticated systems capable of human-like capabilities such as text generation, comprehension, and even coding. But with great power comes greater need for oversight. The opaque nature of these models can obscure how decisions are made and content generated. This makes it even more critical to implement robust observability to monitor and troubleshoot issues such as hallucinations, inappropriate content, cost overruns, errors and performance degradation. By monitoring these models closely, we can safeguard against unexpected outcomes and maintain user trust.</p>
<h3>Real-World Scenarios</h3>
<p>Let's explore real-world scenarios where companies leverage LLM-powered applications to enhance productivity and user experience, and how Elastic's LLM observability solutions monitor critical aspects of these models.</p>
<h4>1. Generative AI for Customer Support</h4>
<p>Companies are increasingly leveraging LLMs and generative AI to enhance customer support, using platforms like Google Vertex AI for hosting these models efficiently. With the introduction of advanced AI models such as Google's Gemini, which is integrated into Vertex AI, businesses can deploy sophisticated chatbots that manage customer inquiries, from basic questions to complex issues, in real time. These AI systems understand and respond with natural language, offering instant support for issues such as product troubleshooting or managing orders thus
reducing wait times. They also learn from each interaction to improve accuracy continuously. This boosts customer satisfaction and allows human agents to focus on complex tasks, enhancing overall efficiency. Other ways that AI tools can further empower customer care agents is with real-time analytics, sentiment detection, and conversation summarization.</p>
<p>To support use cases like the AI-powered customer support described above, Elastic recently launched LLM observability integrations including support for <a href="https://www.elastic.co/guide/en/integrations/current/gcp_vertexai.html">LLMs hosted on GCP Vertex AI</a>. Customers who wish to monitor foundation models such as Gemini and Imagen hosted on Google Vertex AI can benefit from Elastic’s Vertex AI integration to get a deeper understanding of model behavior and performance, and ensure that the AI-driven tools are not only effective but also reliable. Customers get out-of-the-box experience ingesting a curated set of metrics from Vertex AI as well as a pre-configured dashboard.</p>
<p>By continuously tracking these metrics, customers can proactively manage their AI resources, optimize operations, and ultimately enhance the overall customer experience.</p>
<p>Let's look at some of the metrics you get from the Google Vertex AI integration which are helpful in the context of using generative AI for customer support.</p>
<ol>
<li><strong>Prediction Latency</strong>: Measures the time taken to complete predictions, critical for real-time customer interactions.</li>
<li><strong>Error Rate</strong>: Tracks errors in predictions, which is vital for maintaining the accuracy and reliability of AI-driven customer support.</li>
<li><strong>Prediction Count</strong>: Counts the number of predictions made, helping assess the scale of AI usage in customer interactions.</li>
<li><strong>Model Usage</strong>: Tracks how frequently the AI models are accessed by both virtual assistants and customer support tools.</li>
<li><strong>Total Invocations</strong>: Measures the total number of times the AI services are used, providing insights into user engagement and dependency on these tools.</li>
<li><strong>CPU and Memory Utilization</strong>: By observing CPU and memory usage, users can optimize resource allocation, ensuring that the AI tools are running efficiently without overloading the system.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/transforming-industries-and-the-critical-role-of-llm-observability/vertex-overview.png" alt="Vertex Overview" /></p>
<p>To learn more about how Elastic's Google Vertex AI integration can augment your LLM observability, have a quick read of this <a href="https://www.elastic.co/observability-labs/blog/elevate-llm-observability-with-gcp-vertex-ai-integration">blog</a>.</p>
<h4>2. Transforming Healthcare with Generative AI</h4>
<p>The healthcare industry is embracing generative AI to enhance patient interactions and streamline operational workflows. By leveraging platforms like Amazon Bedrock, healthcare organizations deploy advanced large language models (LLMs) to power tools that convert doctor-patient conversations into structured medical notes, reducing administrative overhead and allowing clinicians to prioritize diagnosis and treatment. These AI-driven solutions provide real-time insights, enabling informed decision-making and improving patient outcomes. Additionally, patient-facing applications powered by LLMs offer secure access to health records, empowering individuals to manage their care proactively.</p>
<p>Robust observability is essential to maintain the reliability and performance of these generative AI applications in healthcare. Elastic’s <a href="https://www.elastic.co/guide/en/integrations/current/aws_bedrock.html">Amazon Bedrock integration</a> equips providers with tools to monitor LLM behavior, capturing critical metrics like invocation latency, error rates, token usage and guardrail invocation. Pre-configured dashboards provide visibility into prompt and completion text, enabling teams to verify the accuracy of AI-generated outputs, such as medical notes, and detect issues like hallucinations.</p>
<p>Additionally, customers who configure Guardrails for Amazon Bedrock to filter harmful content like hate speech, personal insults, and other inappropriate topics, can use the Bedrock Integration to observe the prompts and responses that caused the guardrail to filter them out. This helps application developers take proactive actions to maintain a safe and positive user experience.</p>
<p>Some of the logs and metrics that can be helpful for customers using LLMs hosted on Amazon Bedrock are the following</p>
<ol>
<li><strong>Invocation Details</strong>: This Integration records the Invocation latency, count, throttles. These metrics are critical for ensuring that generative AI models respond quickly and accurately to patient queries or appointment scheduling tasks, maintaining a seamless user experience.</li>
<li><strong>Error Rates</strong>:  Tracking error rates ensures that AI tools, such as patient query assistants or appointment systems, consistently deliver accurate and reliable results. By identifying and addressing issues early, healthcare providers can maintain trust in AI systems and prevent disruptions in critical patient interactions.</li>
<li><strong>Token Usage</strong>: In healthcare, tracking token usage helps identify resource-intensive queries, such as detailed patient record summaries or complex symptom analyses, ensuring efficient model operation. By monitoring token usage, healthcare providers can optimize costs for AI-powered tools while maintaining scalability to handle growing patient interactions.</li>
<li><strong>Prompt and Completion Text</strong>: Capturing prompt and completion text allows healthcare providers to analyze how AI models respond to specific patient queries or administrative tasks, ensuring meaningful and contextually accurate interactions. This insight helps refine prompts to improve the AI's understanding and ensures that generated responses, such as appointment details or treatment explanations, meet the quality standards expected in healthcare.</li>
<li><strong>Prompt and response where guardrails intervened</strong>: Being able to track requests and responses that were deemed inappropriate by guardrails helps healthcare providers monitor what information patients are asking for. With this information users can make continuous adjustments to the LLMs to ensure appropriate responses, balancing flexibility and rich communication on the one hand, and on the other, privacy protection, hallucination prevention, and harmful content filtering.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/transforming-industries-and-the-critical-role-of-llm-observability/aws-bedrock-overview.png" alt="Bedrock Overview" /></p>
<p>Amazon Bedrock Gaurdrails OOTB dashboard
<img src="https://www.elastic.co/observability-labs/assets/images/transforming-industries-and-the-critical-role-of-llm-observability/amazon-bedrock-gaurdrails.png" alt="Bedrock Gaurdrails Overview" /></p>
<p>To learn about the Amazon Bedrock Integration, read this <a href="https://www.elastic.co/observability-labs/blog/llm-observability-aws-bedrock">blog</a>. To dive deeper into how the integration can help with observability of Guardrails for Amazon Bedrock, take a look at this <a href="https://www.elastic.co/observability-labs/blog/llm-observability-amazon-bedrock-guardrails">blog</a>.</p>
<h4>3.  Enhancing Telco Efficiency with GenAI</h4>
<p>The telecommunication industry can leverage services like Azure OpenAI to transform customer interactions, optimize operations, and enhance service delivery. By integrating advanced generative AI models, telcos can offer highly personalized and responsive customer experiences across multiple channels. AI-powered virtual assistants streamline customer support by automating routine queries and providing accurate, context-aware responses, reducing the workload on human agents and enabling them to focus on complex issues while improving efficiency and satisfaction. Additionally, AI-driven insights help telcos understand customer preferences, anticipate needs, and deliver tailored offerings that boost customer loyalty. Operationally, LLMs such as Azure OpenAI enhance internal processes by enabling smarter knowledge management and faster access to critical information.</p>
<p>Elastic's LLM observability integrations like the <a href="https://www.elastic.co/guide/en/integrations/current/azure_openai.html">Azure OpenAI integration</a> can provide visibility into AI performance and costs, empowering telecom providers to make data-driven decisions and enhance customer engagement. It can help optimize resource allocation by analyzing call patterns, predicting service demands, and identifying trends, enabling telcos to scale their AI operations efficiently while maintaining high service quality.</p>
<p>Some of the key metrics and logs that Azure OpenAI that can provide insights are:</p>
<ol>
<li><strong>Error Counts</strong>: It provides critical insights into failed requests and incomplete transactions, enabling telecom providers to proactively identify and resolve issues in AI-powered applications.</li>
<li><strong>Prompt Input and Completion Text</strong>: This captures the input queries provided to AI systems and the corresponding AI-generated outputs. These fields allow telecom providers to analyze customer queries, monitor response quality, and refine AI training datasets to improve relevance and accuracy.</li>
<li><strong>Response Latency</strong>: It measures the time taken by AI models to generate responses, ensuring that virtual assistants and automated systems deliver quick and efficient replies to customer queries.</li>
<li><strong>Token Usage</strong>: It tracks the number of input and output tokens processed by the AI model, offering insights into resource consumption and cost efficiency. This data helps telecom providers monitor AI usage patterns, optimize configurations, and scale resources effectively</li>
<li><strong>Content Filter Results</strong>: In Azure OpenAI, this plays a crucial role in handling sensitive inputs provided by customers, ensuring compliance, safety, and responsible AI usage. This feature identifies and flags potentially inappropriate or harmful queries and responses in real time, enabling telecom providers to address sensitive topics with care and accuracy.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/transforming-industries-and-the-critical-role-of-llm-observability/azure-openai-overview.png" alt="Azureopenai Overview" /></p>
<p>The Azure OpenAI content filtering OOTB dashboard
<img src="https://www.elastic.co/observability-labs/assets/images/transforming-industries-and-the-critical-role-of-llm-observability/azure-openai-contentfiltering.png" alt="Azureopenai Overview1" /></p>
<p>You can learn more about Elastic's Azure OpenAI integration from these two blogs - <a href="https://www.elastic.co/observability-labs/blog/llm-observability-azure-openai">Part 1</a> and <a href="https://www.elastic.co/observability-labs/blog/llm-observability-azure-openai-v2">Part 2</a>.</p>
<h4>4. OpenAI Integration for Generative AI Applications</h4>
<p>As AI-powered solutions become integral to modern workflows, OpenAI's sophisticated models, including language models like GPT-4o and GPT-3.5 Turbo, image generation models like DALL·E, and audio processing models like Whisper, drive innovation across applications such as virtual assistants, content creation, and speech-to-text systems. With growing complexity and scale, ensuring these models perform reliably, remain cost-efficient, and adhere to ethical guidelines is paramount. Elastic's <a href="https://www.elastic.co/docs/reference/integrations/openai">OpenAI integration</a> provides a robust solution, offering deep visibility into model behaviour to support seamless and responsible AI deployments.</p>
<p>By tapping into the OpenAI Usage API, Elastic's integration delivers actionable insights through intuitive, pre-configured dashboards, enabling Site Reliability Engineers (SREs) and DevOps teams to monitor performance and optimize resource usage across OpenAI's diverse model portfolio. This unified observability approach empowers organizations to track critical metrics, identify inefficiencies, and maintain high-quality AI-driven experiences. The following key metrics from Elastic's OpenAI integration help organizations achieve effective oversight:</p>
<ol>
<li><strong>Request Latency</strong>: Measures the time taken for OpenAI models to process requests, ensuring responsive performance for real-time applications like chatbots or transcription services.</li>
<li><strong>Invocation Rates</strong>: Tracks the frequency of API calls across models, providing insights into usage patterns and helping identify high-demand workloads.</li>
<li><strong>Token Usage</strong>: Monitors input and output tokens (e.g., prompt, completion, cached tokens) to optimize costs and fine-tune prompts for efficient resource consumption.</li>
<li><strong>Error Counts</strong>: Captures failed requests or incomplete transactions, enabling proactive issue resolution to maintain application reliability.</li>
<li><strong>Image Generation Metrics</strong>: Tracks invocation rates and output dimensions for models like DALL·E, helping assess costs and usage trends in image-based applications.</li>
<li><strong>Audio Transcription Metrics</strong>: Monitors invocation rates and transcribed seconds for audio models like Whisper, supporting cost optimization in speech-to-text workflows.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/transforming-industries-and-the-critical-role-of-llm-observability/openai-overview.png" alt="Openai Overview" /></p>
<p>To learn more about Elastic's OpenAI integration, read this <a href="https://www.elastic.co/observability-labs/blog/llm-observability-openai">blog</a>.</p>
<h4>Actionable LLM Observability</h4>
<p>Elastic's LLM observability integrations empower users to take proactive control of their AI operations through actionable insights and real-time alerts. For instance, by setting a predefined threshold for token count, Elastic can trigger automated alerts when usage exceeds this limit, notifying Site Reliability Engineers (SREs) or DevOps teams via email, Slack, or other preferred channels. This ensures prompt awareness of potential cost overruns or resource-intensive queries, enabling teams to adjust model configurations or scale resources swiftly to maintain operational efficiency.</p>
<p>In the example below, the rule is set to alert the user if token_count crosses a threshold of 500.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/transforming-industries-and-the-critical-role-of-llm-observability/slo-1.png" alt="SLO Overview" /></p>
<p>The alert is triggered when the token count exceeds the threshold as seen below
<img src="https://www.elastic.co/observability-labs/assets/images/transforming-industries-and-the-critical-role-of-llm-observability/slo-2.png" alt="SLO Overview1" /></p>
<p>Another example is tracking invocation spikes, such as when the number of predictions or API calls surpasses a defined Service Level Objective (SLO). For example, if a Bedrock AI-hosted model experiences a sudden surge in invocations due to increased customer interactions, Elastic can alert teams to investigate potential anomalies or scale infrastructure accordingly. These proactive measures help maintain the reliability and cost-effectiveness of LLM-powered applications.</p>
<p>By providing pre-configured dashboards and customizable alerts, Elastic ensures that organizations can respond to critical events in real time, keeping their AI systems aligned with cost and performance goals as well as standards for content safety and reliability.</p>
<h4>Conclusion</h4>
<p>LLMs are transforming industries, but their complexity requires effective oversight observability to ensure their reliability and safe use. Elastic's LLM observability integrations provide a comprehensive solution, empowering businesses to monitor performance, manage resources, and address challenges like hallucinations and content safety. As LLMs become increasingly integral to various sectors, robust observability tools like those offered by Elastic ensure that these AI-driven innovations remain dependable, cost-effective, and aligned with ethical and safety standards.</p>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/transforming-industries-and-the-critical-role-of-llm-observability/llmobs2.png" length="0" type="image/png"/>
        </item>
    </channel>
</rss>