Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observability otel demo #185

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6c00761
Adding an Observability OTEL based demo for Observability playground
YANG-DB May 30, 2023
60b43e2
Adding an Observability OTEL based demo for Observability playground
YANG-DB May 30, 2023
2a51fe9
Merge remote-tracking branch 'origin/observability-otel-demo' into ob…
YANG-DB May 30, 2023
c0e22d2
update service names and otelcol config
YANG-DB May 30, 2023
14ac9b2
Merge remote-tracking branch 'origin/observability-otel-demo' into ob…
YANG-DB Jun 1, 2023
336b154
Merge branch 'main' into observability-otel-demo
YANG-DB Jun 15, 2023
c00039e
update service names and otelcol config
YANG-DB Jun 15, 2023
193fad3
update integration service to load all schema and dashboards into the…
YANG-DB Jun 15, 2023
c544a01
update integration service to load all schema and dashboards into the…
YANG-DB Jun 15, 2023
cbb0abb
Merge remote-tracking branch 'origin/observability-otel-demo' into ob…
YANG-DB Jun 15, 2023
7aa4905
Merge remote-tracking branch 'origin/observability-otel-demo' into ob…
YANG-DB Jun 15, 2023
9e44934
Merge remote-tracking branch 'origin/observability-otel-demo' into ob…
YANG-DB Jun 15, 2023
f9eb4b5
Merge remote-tracking branch 'origin/observability-otel-demo' into ob…
YANG-DB Jun 15, 2023
d5f5333
Merge remote-tracking branch 'origin/observability-otel-demo' into ob…
YANG-DB Jun 15, 2023
1a6d50f
Merge remote-tracking branch 'origin/observability-otel-demo' into ob…
YANG-DB Jun 15, 2023
caa94d0
Merge remote-tracking branch 'origin/observability-otel-demo' into ob…
YANG-DB Jun 15, 2023
fff5e3a
Merge branch 'main' into observability-otel-demo
YANG-DB Dec 14, 2023
c16ffbb
Merge remote-tracking branch 'origin/observability-otel-demo' into ob…
YANG-DB Dec 14, 2023
b05e3eb
update recent otel-demo changes
YANG-DB Dec 14, 2023
9c175cd
update otel-pipeline documentations
YANG-DB Dec 14, 2023
027a859
Merge branch 'main' into observability-otel-demo
YANG-DB Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions config/playground/demo/observability/otel_demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Opensearch OTEL Demo Architecture
This document will review the OpenSearch architecture for the [OTEL demo](https://opentelemetry.io/docs/demo/) and will review how to use the new Observability capabilities
implemented into OpenSearch.
---
This diagram provides an overview of the system components, showcasing the configuration derived from the OpenTelemetry Collector (otelcol) configuration file utilized by the OpenTelemetry demo application.

Additionally, it highlights the observability data (traces and metrics) flow within the system.

![](img/otelcol-data-flow-overview.png)

---
[OTEL DEMO](https://opentelemetry.io/docs/demo/architecture/) Describes the list of services that are composing the Astronomy Shop.

They are combined of:
- [Accounting](https://opentelemetry.io/docs/demo/services/accounting/)
- [Ad](https://opentelemetry.io/docs/demo/services/ad/)
- [Cart](https://opentelemetry.io/docs/demo/services/cart/)
- [Checkout](https://opentelemetry.io/docs/demo/services/checkout/)
- [Currency](https://opentelemetry.io/docs/demo/services/currency/)
- [Email](https://opentelemetry.io/docs/demo/services/email/)
- [Feature Flag](https://opentelemetry.io/docs/demo/services/feature-flag/)
- [Fraud Detection](https://opentelemetry.io/docs/demo/services/fraud-detection/)
- [Frontend](https://opentelemetry.io/docs/demo/services/frontend/)
- [Kafka](https://opentelemetry.io/docs/demo/services/kafka/)
- [Payment](https://opentelemetry.io/docs/demo/services/payment/)
- [Product Catalog](https://opentelemetry.io/docs/demo/services/product-catalog/)
- [Quote](https://opentelemetry.io/docs/demo/services/quote/)
- [Recommendation](https://opentelemetry.io/docs/demo/services/recommendation/)
- [Shipping](https://opentelemetry.io/docs/demo/services/shipping/)
- [Fluent-Bit]() *(Nginx's otel log exported)*
- [Integrations]() *(Pre-canned OpenSearch assets)*
- [DataPrepper]() *(OpenSearch's ingestion pipeline)*

Backend supportive services
- [Load Generator]()
- See [description]()
- [Frontend Nginx Proxy]() *(Replacement for _Frontend-Proxy_)*
- [OpenSearch]()
- [Dashboards]()
- [Prometheus]()
- [Feature-Flag]()

### Services Topology
The next diagram shows the docker compose services dependencies

![](img/docker-services-topology.png)
---

## Purpose
The purpose of this demo is to demonstrate the different capabilities of OpenSearch Observability to investigate and reflect your system.

### Ingestion
The ingestion capabilities for OpenSearch is to be able to support multiple pipelines:
- [Data-Prepper](https://github.com/opensearch-project/data-prepper/) is an OpenSearch ingestion project that allows ingestion of OTEL standard signals using Otel-Collector
- [Jaeger](https://opensearch.org/docs/latest/observing-your-data/trace/trace-analytics-jaeger/) is an ingestion framework which has a build in capability for pushing OTEL signals into OpenSearch
- [Fluent-Bit](https://docs.fluentbit.io/manual/pipeline/outputs/opensearch) is an ingestion framework which has a build in capability for pushing OTEL signals into OpenSearch

### Integrations -
The integration service is a list of pre-canned assets that are loaded in a combined manner to allow users the ability for simple and automatic way to discover and review their services topology.

These (demo-sample) integrations contain the following assets:
- components & index template mapping
- datasources
- data-stream & indices
- queries
- dashboards

Once they are loaded, the user can imminently review the OTEL demo services and dashboards that reflect the system state.
- [Nginx Dashboard]() - reflects the Nginx Proxy server that routes all the network communication to/from the frontend
- [Prometheus datasource]() - reflects the connectivity to the prometheus metric storage that allows us to federate metrics analytics queries
- [Logs Datastream]() - reflects the data-stream used by nginx logs ingestion and dashboards representing a well-structured [log schema](../src/integrations/mapping-templates/logs.mapping)

Once these assets are loaded - the user can start reviewing its Observability dashboards and traces

![Nginx Dashboard](img/nginx_dashboard.png)

![Prometheus Metrics](img/prometheus_federated_metrics.png)

![Trace Analytics](img/trace_analytics.png)

![Service Maps](img/services.png)

![Traces](img/traces.png)

![ServiceGraph](img/service-graph.png)
---

### **Scenarios**

How can you solve problems with OpenTelemetry? These scenarios walk you through some pre-configured problems and show you how to interpret OpenTelemetry data to solve them.

- Generate a Product Catalog error for GetProduct requests with product id: OLJCESPC7Z using the Feature Flag service
- Discover a memory leak and diagnose it using metrics and traces. Read more

### **Reference**
Project reference documentation, like requirements and feature matrices [here](https://opentelemetry.io/docs/demo/#reference)

Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
---
# Data Prepper Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: data-prepper
namespace: otel-demo
spec:
replicas: 1
selector:
matchLabels:
app: data-prepper
template:
metadata:
labels:
app: data-prepper
spec:
containers:
- name: data-prepper
image: opensearchproject/data-prepper:latest
ports:
- containerPort: 21890
volumeMounts:
YANG-DB marked this conversation as resolved.
Show resolved Hide resolved
- name: config-volume
mountPath: /usr/share/data-prepper/pipelines/pipelines.yaml
subPath: pipelines.yaml
- name: config-volume
mountPath: /usr/share/data-prepper/config/data-prepper-config.yaml
subPath: data-prepper-config.yaml
volumes:
- name: config-volume
configMap:
name: data-prepper-config
restartPolicy: Always
---
# Data Prepper config-map
apiVersion: v1
kind: ConfigMap
metadata:
name: data-prepper-config
namespace: otel-demo
data:
trace_analytics_no_ssl_2x.yml: |
YANG-DB marked this conversation as resolved.
Show resolved Hide resolved
entry-pipeline:
delay: "100"
source:
otel_trace_source:
ssl: false
sink:
- pipeline:
name: "raw-pipeline"
- pipeline:
name: "service-map-pipeline"
raw-pipeline:
source:
pipeline:
name: "entry-pipeline"
processor:
- otel_trace_raw:
sink:
- opensearch:
hosts: [ "https://opensearch-cluster-leader.default.svc:9200" ]
insecure: true
username: "{USR}"
password: "{PSWD}"
index_type: trace-analytics-raw
service-map-pipeline:
delay: "100"
source:
pipeline:
name: "entry-pipeline"
processor:
- service_map_stateful:
sink:
- opensearch:
hosts: [ "https://opensearch-cluster-leader.default.svc:9200" ]
insecure: true
username: "{USR}"
password: "{PSWD}"
index_type: trace-analytics-service-map
pipelines.yaml: |
ssl: false
---
# Data Prepper Service
apiVersion: v1
kind: Service
metadata:
name: data-prepper-service
namespace: otel-demo
spec:
selector:
app: data-prepper
ports:
- protocol: TCP
port: 21890
targetPort: 21890
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading