Skip to content

Commit b726303

Browse files
authored
Merge branch 'opensearch-project:main' into main
2 parents 083b6ff + d1d3ae0 commit b726303

9 files changed

Lines changed: 185 additions & 122 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
Observability Stack is an open-source stack designed for modern distributed systems. Built on OpenTelemetry, OpenSearch, and Prometheus, Observability Stack provides a complete, pre-configured infrastructure for monitoring microservices, web applications, and AI agents—with first-class support for agent observability through [OpenTelemetry Gen-AI Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/).
66

7+
https://github.com/opensearch-project/observability-stack/releases/download/v3.6.0-alpha.1/observability-stack-overview.mp4
8+
79
![OpenSearch Observability Stack Architecture - docker-compose](./docs/observability-stack-arch-compose.excalidraw.png)
810

911
## Components

docs/starlight-docs/astro.config.mjs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import mermaid from 'astro-mermaid';
77
export default defineConfig({
88
site: 'https://observability.opensearch.org',
99
base: '/docs',
10+
redirects: {
11+
'/get-started': '/get-started/installation/',
12+
},
1013
integrations: [
1114
mermaid({
1215
autoTheme: true,
@@ -35,7 +38,18 @@ export default defineConfig({
3538
{
3639
label: 'Get Started',
3740
collapsed: true,
38-
autogenerate: { directory: 'get-started' },
41+
items: [
42+
{ label: 'Installation', link: '/get-started/installation/' },
43+
{ label: 'Platform Overview', link: '/get-started/overview/' },
44+
{ label: 'Core Concepts', link: '/get-started/core-concepts/' },
45+
{
46+
label: 'Quickstart',
47+
items: [
48+
{ label: 'Ingest Your First Traces', link: '/get-started/quickstart/first-traces/' },
49+
{ label: 'Create Your First Dashboard', link: '/get-started/quickstart/first-dashboard/' },
50+
],
51+
},
52+
],
3953
},
4054
{
4155
label: 'Send Data',

docs/starlight-docs/src/content/docs/get-started/core-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ PromQL is Prometheus's query language for time-series metrics. The Observability
4040
OpenSearch stores observability data in indices following naming conventions:
4141
- `otel-v1-apm-span-*` — trace spans
4242
- `otel-v2-apm-service-map` — service map data
43-
- `ss4o_logs-*` — log data
43+
- `logs-otel-v1*` — log data

docs/starlight-docs/src/content/docs/get-started/index.md

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
title: Installation
3+
description: Install and run the OpenSearch Observability Stack
4+
---
5+
6+
The OpenSearch Observability Stack is an open-source, OpenTelemetry-native observability platform. It runs locally via Docker Compose and provides traces, logs, metrics, dashboards, service maps, and AI agent tracing out of the box.
7+
8+
<video src="https://github.com/opensearch-project/observability-stack/releases/download/v3.6.0-alpha.1/observability-stack-installation.mp4" controls></video>
9+
10+
## Prerequisites
11+
12+
- **Docker** and **Docker Compose** (v2.20+)
13+
- At least 8 GB of available RAM
14+
- macOS, Linux, or WSL2 on Windows
15+
16+
## Installation
17+
18+
Installation takes 8–15 minutes depending on your internet connection.
19+
20+
import { Tabs, TabItem } from '@astrojs/starlight/components';
21+
22+
<Tabs>
23+
<TabItem label="Interactive Installer">
24+
```bash
25+
curl -fsSL https://raw.githubusercontent.com/opensearch-project/observability-stack/main/install.sh | bash
26+
```
27+
The installer TUI guides you through component selection and configuration. Installation takes 8–15 minutes. Once complete, the stack starts automatically.
28+
Access OpenSearch Dashboards at http://localhost:5601
29+
</TabItem>
30+
<TabItem label="Docker Compose">
31+
```bash
32+
git clone https://github.com/opensearch-project/observability-stack.git
33+
cd observability-stack
34+
docker compose up -d
35+
```
36+
Access OpenSearch Dashboards at [http://localhost:5601](http://localhost:5601)
37+
</TabItem>
38+
</Tabs>
39+
40+
Credentials are stored in the `.env` file at the installation root:
41+
42+
```bash
43+
cd observability-stack
44+
grep -E '^OPENSEARCH_(USER|PASSWORD)=' .env
45+
```
46+
47+
## What gets installed
48+
49+
| Component | Purpose |
50+
|-----------|---------|
51+
| OpenTelemetry Collector | Receives traces, logs, and metrics via OTLP |
52+
| Data Prepper | Processes traces, generates service maps and RED metrics |
53+
| OpenSearch | Stores and indexes all observability data |
54+
| Prometheus | Scrapes and stores time-series metrics |
55+
| OpenSearch Dashboards | Visualizes data, agent traces, and service maps |
56+
| [Example services](#example-services) | Multi-agent travel planner, weather, and events agents that generate agent traces with GenAI semantic conventions |
57+
58+
### Example services
59+
60+
The stack ships with example AI agent services that generate agent traces automatically — a multi-agent travel planner, weather agent, and events agent. These are enabled by default.
61+
62+
To disable them, comment out this line in `.env`:
63+
64+
```env
65+
# INCLUDE_COMPOSE_EXAMPLES=docker-compose.examples.yml
66+
```
67+
68+
#### OpenTelemetry Demo
69+
70+
You can also run the [OpenTelemetry Demo](https://opentelemetry.io/docs/demo/), a full microservices e-commerce app that generates realistic telemetry. Uncomment in `.env`:
71+
72+
```env
73+
INCLUDE_COMPOSE_OTEL_DEMO=docker-compose.otel-demo.yml
74+
```
75+
76+
This adds ~2 GB memory usage. See [Resource Requirements](https://github.com/opensearch-project/observability-stack#resource-requirements) for details.
77+
78+
After any `.env` change: `docker compose down && docker compose up -d`
79+
80+
## Updating
81+
82+
Component images are updated on new OpenSearch releases. To pull the latest:
83+
84+
```bash
85+
cd observability-stack
86+
git pull
87+
docker compose down
88+
docker compose up -d --pull always
89+
```
90+
91+
## Uninstall
92+
93+
The stack runs via Docker Compose from the cloned `observability-stack` repository. To stop all services and remove data:
94+
95+
```bash
96+
cd observability-stack
97+
docker compose down -v --remove-orphans
98+
```
99+
100+
To fully remove, delete the repository directory.
101+
102+
## Next steps
103+
104+
- [Platform Overview](/docs/get-started/overview/) — architecture and data flow
105+
- [Core Concepts](/docs/get-started/core-concepts/) — key terms and ideas
106+
- [Quickstart](/docs/get-started/quickstart/) — send your first traces

docs/starlight-docs/src/content/docs/get-started/quickstart/first-traces.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,27 @@ title: Ingest Your First Traces
33
description: Instrument your application to send traces to the Observability Stack
44
---
55

6-
This guide shows how to instrument a Python application with OpenTelemetry and send traces to the Observability Stack.
7-
8-
## Install dependencies
6+
## 1. Install dependencies
97

108
```bash
119
pip install opentelemetry-api opentelemetry-sdk opentelemetry-exporter-otlp
1210
```
1311

14-
## Configure the exporter
12+
## 2. Send traces
1513

1614
```python
1715
from opentelemetry import trace
1816
from opentelemetry.sdk.trace import TracerProvider
1917
from opentelemetry.sdk.trace.export import BatchSpanProcessor
2018
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
2119

22-
# Point to the OTel Collector
2320
exporter = OTLPSpanExporter(endpoint="http://localhost:4317", insecure=True)
24-
2521
provider = TracerProvider()
2622
provider.add_span_processor(BatchSpanProcessor(exporter))
2723
trace.set_tracer_provider(provider)
2824

2925
tracer = trace.get_tracer("my-app")
30-
```
3126

32-
## Create spans
33-
34-
```python
3527
with tracer.start_as_current_span("handle-request") as span:
3628
span.set_attribute("http.method", "GET")
3729
span.set_attribute("http.url", "/api/users")
@@ -41,14 +33,17 @@ with tracer.start_as_current_span("handle-request") as span:
4133
# your database query here
4234
```
4335

44-
## Verify in Dashboards
36+
For other languages, see [Send Data](/docs/send-data/).
37+
38+
## 3. View traces in OpenSearch Dashboards
4539

46-
1. Open `http://localhost:5601`.
47-
2. Go to **Observability** > **Traces**.
48-
3. Search for your trace by name or filter by time range.
49-
4. Click a trace to see the span tree, timing, and attributes.
40+
1. Open [OpenSearch Dashboards](http://localhost:5601)
41+
2. Navigate to **Observability** **Traces**
42+
3. Search for your trace by name or filter by time range
43+
4. Click a trace to see the span tree, timing, and attributes
5044

5145
## Next steps
5246

53-
- [Create Your First Dashboard](/docs/get-started/quickstart/first-dashboard/)
47+
- [Create Your First Dashboard](/docs/get-started/quickstart/first-dashboard/) — build custom visualizations
48+
- [Agent Tracing](/docs/ai-observability/agent-tracing/) — trace AI agent workflows with GenAI semantic conventions
5449
- [Send Data](/docs/send-data/) — more instrumentation options

docs/starlight-docs/src/content/docs/get-started/quickstart/index.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

docs/starlight-docs/src/content/docs/index.mdx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,35 @@ import IconCardGrid from '../../components/IconCardGrid.astro';
99

1010
OpenSearch Observability Stack is an **open-source, OpenTelemetry-native observability platform** ([GitHub](https://github.com/opensearch-project/observability-stack)) for monitoring services, infrastructure, and AI agents. Install locally via Docker Compose — traces, logs, Prometheus metrics, service maps, and agent tracing out of the box.
1111

12-
## What You Can Do
13-
1412
<IconCardGrid>
1513
<IconCard title="Traces, Logs & Metrics" icon="/docs/icons/app_visualize.svg" items={["Collect via OTLP", "Log-trace correlation", "Search with PPL and PromQL"]} href="/docs/investigate/discover-logs/" />
1614
<IconCard title="Application Monitoring" icon="/docs/icons/app_apm.svg" items={["Auto-generated service maps", "RED metrics from traces", "Latency and error tracking"]} href="/docs/apm/" />
1715
<IconCard title="AI Agent Observability" icon="/docs/icons/app_ml.svg" items={["Trace LLM calls, token usage, and tool use", "Agent execution graphs", "Python and JavaScript SDKs"]} href="/docs/ai-observability/" />
1816
<IconCard title="Dashboards & Alerting" icon="/docs/icons/app_dashboard.svg" items={["Custom dashboards", "Anomaly detection", "Slack, email, webhook alerts"]} href="/docs/dashboards/" />
1917
</IconCardGrid>
2018

21-
## Why Observability Stack?
19+
### See it in action
2220

23-
- **Open source**: Fully open source, no vendor lock-in, self-host everything
24-
- **OpenTelemetry-native**: All data ingestion uses OTel protocols and [semantic conventions](https://opentelemetry.io/docs/specs/semconv/)
25-
- **GenAI-first**: Purpose-built views for AI agent tracing using standard `gen_ai.*` attributes
26-
- **Local-first**: Runs entirely on your machine via Docker Compose — no cloud account required
27-
- **Production path**: Same components (OpenSearch, Prometheus, OTel Collector) scale to production
21+
<video src="https://github.com/opensearch-project/observability-stack/releases/download/v3.6.0-alpha.1/observability-stack-overview.mp4" controls></video>
2822

2923
## Quickstarts
3024

31-
<LinkCard title="Install & Explore" href="/docs/get-started/" description="Install the stack and explore traces already flowing from the built-in example services." />
32-
<LinkCard title="Send Your First Traces" href="/docs/get-started/quickstart/" description="Instrument an app with the Python SDK and see traces in dashboards." />
25+
<LinkCard title="Install & Explore" href="/docs/get-started/installation/" description="Install the stack and explore traces already flowing from the built-in example services." />
26+
<LinkCard title="Send Your First Traces" href="/docs/get-started/quickstart/" description="Instrument an app with OpenTelemetry and see traces in dashboards." />
3327
<LinkCard title="Trace an AI Agent" href="/docs/ai-observability/agent-tracing/" description="Instrument an AI agent with GenAI semantic conventions and visualize the execution graph." />
3428

3529
<Aside type="tip">
36-
The stack optionally ships with example services — a multi-agent travel planner, weather agent, and events agent that generate agent traces automatically. You can also enable the [OpenTelemetry Demo](https://opentelemetry.io/docs/demo/architecture/), a full microservices e-commerce app for realistic telemetry. Install, open Dashboards, and start exploring — no instrumentation needed.
30+
The stack optionally ships with [example services](https://github.com/opensearch-project/observability-stack/tree/main/examples) — a multi-agent travel planner, weather agent, and events agent that generate agent traces automatically. You can also enable the [OpenTelemetry Demo](https://opentelemetry.io/docs/demo/architecture/), a full microservices e-commerce app for realistic telemetry. Install, open Dashboards, and start exploring — no instrumentation needed.
3731
</Aside>
3832

33+
## Why Observability Stack?
34+
35+
- **Open source**: Fully open source, no vendor lock-in, self-host everything
36+
- **OpenTelemetry-native**: All data ingestion uses OTel protocols and [semantic conventions](https://opentelemetry.io/docs/specs/semconv/)
37+
- **GenAI-first**: Purpose-built views for AI agent tracing using standard `gen_ai.*` attributes
38+
- **Local-first**: Runs entirely on your machine via Docker Compose — no cloud account required
39+
- **Production path**: Same components (OpenSearch, Prometheus, OTel Collector) scale to production
40+
3941
## Community
4042

4143
- [GitHub](https://github.com/opensearch-project/observability-stack) — issues, PRs, and discussions

examples/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Examples
2+
3+
Instrumented agent examples for the Observability Stack. Each demonstrates OpenTelemetry tracing with [Gen-AI Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/). Follow the README in each folder to try the example agents, which are fully instrumented with OpenTelemetry so you can explore agent traces and telemetry data in OpenSearch Dashboards.
4+
5+
## Examples
6+
7+
| Example | Framework | Description |
8+
|---------|-----------|-------------|
9+
| [plain-agents/weather-agent](./plain-agents/weather-agent/) | OpenTelemetry SDK | Standalone weather assistant with fault injection, OTLP traces/metrics/logs |
10+
| [plain-agents/multi-agent-planner](./plain-agents/multi-agent-planner/) | OpenTelemetry SDK | Distributed travel planner with trace context propagation across sub-agents |
11+
| [strands/code-assistant](./strands/code-assistant/) | Strands SDK | AI coding assistant with auto-instrumented GenAI spans |
12+
| [langchain/bedrock-financial-assistant](./langchain/bedrock-financial-assistant/) | LangChain | Financial assistant using Bedrock Claude with automatic LangChain tracing |
13+
14+
## Prerequisites
15+
16+
- Python 3.9+, [uv](https://docs.astral.sh/uv/)
17+
- Observability Stack running (`docker compose up -d` from repo root)
18+
19+
## Quick Start
20+
21+
The `plain-agents` examples run automatically with the stack. For standalone examples:
22+
23+
```bash
24+
cd <example-dir>
25+
uv run python main.py
26+
```
27+
28+
View telemetry at:
29+
- **OpenSearch Dashboards**: http://localhost:5601
30+
- **Prometheus**: http://localhost:9090
31+
32+
## OTLP Endpoints
33+
34+
| Port | Protocol | Use With |
35+
|------|----------|----------|
36+
| 4317 | gRPC | OpenTelemetry SDK (`OTLPSpanExporter`) |
37+
| 4318 | HTTP/protobuf | Strands SDK (`setup_otlp_exporter()`) |

0 commit comments

Comments
 (0)