diff --git a/images/llm-amazon-bedrock-guardrails.png b/images/llm-amazon-bedrock-guardrails.png new file mode 100644 index 0000000000..9e9400fd06 Binary files /dev/null and b/images/llm-amazon-bedrock-guardrails.png differ diff --git a/images/llm-costs-usage-concerns.png b/images/llm-costs-usage-concerns.png new file mode 100644 index 0000000000..efb0c9fa8f Binary files /dev/null and b/images/llm-costs-usage-concerns.png differ diff --git a/images/llm-openai-applications.png b/images/llm-openai-applications.png new file mode 100644 index 0000000000..977cf933ec Binary files /dev/null and b/images/llm-openai-applications.png differ diff --git a/images/llm-performance-reliability.png b/images/llm-performance-reliability.png new file mode 100644 index 0000000000..9df715cf98 Binary files /dev/null and b/images/llm-performance-reliability.png differ diff --git a/solutions/observability/apps.md b/solutions/observability/apps.md index fe99fd889f..e1247f4aae 100644 --- a/solutions/observability/apps.md +++ b/solutions/observability/apps.md @@ -15,6 +15,7 @@ Explore the topics in this section to learn how to observe and monitor software | | | | --- | --- | +| [LLM Observability](../../solutions/observability/apps/llm-observability.md) | Monitor LLM-powered applications to keep them reliable, efficient, cost-effective, and easy to troubleshoot.| | [Application performance monitoring (APM)](../../solutions/observability/apps/application-performance-monitoring-apm.md) | Monitor software services and applications in real time, by collecting detailed performance information on response time for incoming requests, database queries, calls to caches, external HTTP requests, and more. | | [Synthetic monitoring](../../solutions/observability/apps/synthetic-monitoring.md) | Monitor the availability of network endpoints and services. | | [Real user monitoring](../../solutions/observability/apps/real-user-monitoring-user-experience.md) | Quantify and analyze the perceived performance of your web application using real-world user experiences. | diff --git a/solutions/observability/apps/llm-observability.md b/solutions/observability/apps/llm-observability.md new file mode 100644 index 0000000000..e8aea8a817 --- /dev/null +++ b/solutions/observability/apps/llm-observability.md @@ -0,0 +1,78 @@ +--- +navigation_title: "LLM Observability" +--- + +# LLM Observability + +While LLMs hold incredible transformative potential, they also bring complex challenges in reliability, performance, and cost management. Traditional monitoring tools require an evolved set of observability capabilities to ensure these models operate efficiently and effectively. +To keep your LLM-powered applications reliable, efficient, cost-effective, and easy to troubleshoot, Elastic provides a powerful LLM observability framework including key metrics, logs, and traces, along with pre-configured, out-of-the-box dashboards that deliver deep insights into model prompts and responses, performance, usage, and costs. +Elastic’s end-to-end LLM observability is delivered through the following methods: + +- Metrics and logs ingestion for LLM APIs (via [Elastic integrations](https://www.elastic.co/guide/en/integrations/current/introduction.html)) +- APM tracing for LLM Models (via [instrumentation](https://elastic.github.io/opentelemetry/)) + +## Metrics and logs ingestion for LLM APIs (via Elastic integrations) + +Elastic’s LLM integrations now support the most widely adopted models, including OpenAI, Azure OpenAI, and a diverse range of models hosted on Amazon Bedrock and Google Vertex AI. Depending on the LLM provider you choose, the following table shows which source you can use and which type of data -- log or metrics -- you can collect. + +| **LLM Provider** | **Source** | **Metrics** | **Logs** | +|--------|------------|------------| +| [Amazon Bedrock](https://www.elastic.co/guide/en/integrations/current/aws_bedrock.html)| [AWS CloudWatch Logs] [impl-bedrock](https://github.com/elastic/integrations/tree/main/packages/aws_bedrock#compatibility) | ✅ | ✅ | +| [Azure OpenAI](https://www.elastic.co/guide/en/integrations/current/azure_openai.html)| [Azure Monitor and Event Hubs] [impl-azure](https://github.com/elastic/integrations/tree/main/packages/azure_openai#azure-openai-integration) | ✅ | ✅ | +| [GCP Vertex AI](https://www.elastic.co/guide/en/integrations/current/gcp_vertexai.html) | [GCP Cloud Monitoring] [impl-vertexai](https://github.com/elastic/integrations/tree/main/packages/gcp_vertexai#overview) | ✅ | 🚧 | +| [OpenAI](https://www.elastic.co/guide/en/integrations/current/openai.html) | [OpenAI Usage API] [openai-usage](https://platform.openai.com/docs/api-reference/usage) | ✅| 🚧 | + +## APM tracing for LLM models (via instrumentation) + +Elastic offers specialized OpenTelemetry Protocol (OTLP) tracing for applications leveraging LLM models hosted on OpenAI, Azure, and Amazon Bedrock, providing a detailed view of request flows. This tracing capability captures critical insights, including the specific models used, request duration, errors encountered, token consumption per request, and the interaction between prompts and responses. Ideal for troubleshooting, APM tracing allows you to find exactly where the issue is happening with precision and efficiency in your LLM-powered application. + +You can instrument the application with one of the following Elastic Distributions of OpenTelemetry (EDOT): + +- [Python](https://github.com/elastic/elastic-otel-python) +- [Node.js](https://github.com/elastic/elastic-otel-node) +- [Java](https://github.com/elastic/elastic-otel-java) + +EDOT includes many types of instrumentation. This [table](https://elastic.github.io/opentelemetry/use-cases/llm/#supported-technologies) lists the supported technologies. + +### Getting started + +Check [these instructions](https://elastic.github.io/opentelemetry/use-cases/llm/) on how to setup and collect OpenTelemetry data for your LLM applications. + +## Use cases + +### Understand LLM performance and reliability + +For an SRE team optimizing a customer support system powered by Azure OpenAI, Elastic’s [Azure OpenAI integration](https://www.elastic.co/guide/en/integrations/current/azure_openai.html) provides critical insights. They can quickly identify which model variants experience higher latency or error rates, enabling smarter decisions on model deployment or even switching providers based on real-time performance metrics. + +:::{image} ../../../images/llm-performance-reliability.png +:alt: LLM performance and reliability +:screenshot: +::: + +### Troubleshoot OpenAI-powered applications + +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, identify if one specific API call or model invocation is the bottleneck, and monitor a request to see the exact prompt and response between the user and the LLM. + +:::{image} ../../../images/llm-openai-applications.png +:alt: Troubleshoot OpenAI-powered applications +:screenshot: +::: + +### Addressing cost and usage concerns + +For cost-sensitive deployments, being acutely aware of which LLM configurations are more cost-effective is crucial. Elastic’s dashboards, pre-configured to display model usage patterns, help mitigate unnecessary spending effectively. You can use out-of-the-box dashboards for metrics, logs, and traces. + +:::{image} ../../../images/llm-costs-usage-concerns.png +:alt: LLM cost and usage concerns +:screenshot: +::: + +### Understand compliance with guardrails in Amazon Bedrock + +With the Elastic Amazon Bedrock integration for Guardrails, 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. + +:::{image} ../../../images/llm-amazon-bedrock-guardrails.png +:alt: Elastic Amazon Bedrock integration for Guardrails +:screenshot: +::: + diff --git a/solutions/toc.yml b/solutions/toc.yml index b313346824..3226126798 100644 --- a/solutions/toc.yml +++ b/solutions/toc.yml @@ -99,6 +99,7 @@ toc: - file: observability/get-started/get-started-with-dashboards.md - file: observability/apps.md children: + - file: observability/apps/llm-observability.md - file: observability/apps/application-performance-monitoring-apm.md children: - file: observability/apps/get-started-with-apm.md