# Native Observability — OpenTelemetry Integration

The **Native Observability OTEL module** provides OpenTelemetry-compatible
telemetry output for the Native Observability platform.

It enables Drupal applications to export observability data generated by
Native Observability to external monitoring systems such as:

- OpenTelemetry collectors
- Prometheus
- Grafana
- Elastic observability stacks
- cloud monitoring platforms

This module allows Drupal to integrate with modern observability pipelines
while keeping instrumentation fully native inside the application.

---

# 🎯 Purpose

Native Observability records detailed runtime information inside Drupal,
including request traces, execution spans, and performance metrics.

The OTEL module allows this information to be exported using standard
telemetry formats so that external monitoring platforms can ingest,
analyze, and visualize the data.

This bridges **Drupal-native instrumentation** with **industry-standard
observability ecosystems**.

---

# 🚀 Features

### OpenTelemetry-Compatible Exporters

Provides exporters capable of producing telemetry output compatible with
OpenTelemetry pipelines.

This allows traces and metrics collected inside Drupal to be forwarded
to external observability systems.

---

### Prometheus Metrics Endpoint

The module provides a Prometheus-compatible endpoint exposing aggregated
metrics generated by the Native Observability metrics engine.

This allows Prometheus to scrape performance metrics directly from Drupal.

Typical exported metrics include:

- request throughput
- route execution duration
- performance percentiles
- request counts

---

### Telemetry Output Builder

The module includes a telemetry builder responsible for transforming
internal observability data into exportable formats.

This includes:

- metric normalization
- exporter discovery
- telemetry formatting

---

### Exporter Plugin Architecture

Exporters are designed to be extensible.

Developers can implement additional exporters to support different
observability pipelines or monitoring systems.

---

# 🧩 Architecture

The module integrates with multiple components of the Native Observability system:

- trace recorder infrastructure
- execution spans
- metrics aggregation engine
- telemetry output builders

Telemetry exporters convert this internal observability data into formats
understood by external monitoring systems.

---

# 📦 Requirements

This module requires:

- Drupal 11
- `native_observability`
- `native_observability_metrics`

Optional integrations:

- `native_observability_execution`
- `native_observability_spans`

---

# ⚙️ Installation

Enable the module using Drush:

```bash
drush en native_observability_otel
