Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
57 changes: 57 additions & 0 deletions src/data/navigation/sections/integration-starter-kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,63 @@ module.exports = [
path: "/starter-kit/integration/create-data-flow.md"
},
*/
{
title: "Monitoring",
header: true,
path: "/starter-kit/integration/telemetry/",
pages: [
{
title: "Telemetry",
path: "/starter-kit/integration/telemetry/",
pages: [
{
title: "Module",
path: "/starter-kit/integration/telemetry/module.md"
},
{
title: "Open telemetry",
path: "/starter-kit/integration/telemetry/open-telemetry.md"
},
{
title: "Tunnel forwarding",
path: "/starter-kit/integration/telemetry/tunnel-forwarding.md"
},
{
title: "Use cases",
path: "/starter-kit/integration/telemetry/use-cases/",
pages: [
{
title: "Grafana",
path: "/starter-kit/integration/telemetry/use-cases/grafana.md"
},
{
title: "New Relic",
path: "/starter-kit/integration/telemetry/use-cases/new-relic.md"
},
]
},
{
title: "Reference",
path: "/starter-kit/integration/telemetry/reference/",
pages: [
{
title: "Functions",
path: "/starter-kit/integration/telemetry/reference/functions.md"
},
{
title: "Interfaces",
path: "/starter-kit/integration/telemetry/reference/interfaces.md"
},
{
title: "Aliases",
path: "/starter-kit/integration/telemetry/reference/aliases.md"
},
]
},
],
},
],
},
{
title: "Reference applications",
header: true,
Expand Down
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/pages/_images/telemetry/no-collector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/pages/_images/telemetry/open-telemetry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/pages/_images/telemetry/otel-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/pages/_images/telemetry/with-collector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions src/pages/starter-kit/integration/telemetry/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: Telemetry integration overview
description: Learn about the telemetry and observability features in the integration starter kit, including OpenTelemetry support and usage patterns.
keywords:
- Extensibility
- App Builder
- Events
- Starter Kit
- Tools
---

# Telemetry integration overview

The integration starter kit provides built-in support for telemetry and observability using OpenTelemetry standards. This enables you to collect, export, and analyze metrics and traces from your integration flows, making it easier to monitor, troubleshoot, and optimize your integrations.

## Features

- **Automatic instrumentation** for serverless actions
- **Custom metrics and traces** for business and technical events
- **Pluggable exporters** such as Grafana and New Relic
- **Context propagation** across distributed systems
- **Developer-friendly API** for adding custom telemetry

## Getting started

- Explore [OpenTelemetry concepts](./open-telemetry.md) for background and best practices.
- See [use cases](./use-cases/) for practical examples, such as Grafana and New Relic instrumentation.
- Review the [API reference](./reference/index.md) for available telemetry functions.

## Why use telemetry?

Telemetry provides visibility into your integration flows, helping you:

- Detect and diagnose issues quickly
- Measure performance and reliability
- Gain insights into business processes
- Meet compliance and operational requirements

## Integrating OpenTelemetry

The integration starter kit has the `@adobe/aio-lib-telemetry` package pre-installed as a local, non-published dependency in the `packages` folder. This library makes it easy to instrument your App Builder actions using OpenTelemetry, enabling you to collect and export:

- **Traces** (with distributed tracing support)
- **Metrics** (for monitoring)
- **Logs** (for debugging)

For detailed guides and examples, see the [telemetry module documentation](./module.md).

### Example integration

<InlineAlert variant="info" slots="text" />

For detailed integration instructions, refer to the [Using the telemetry module](./module.md#using-the-telemetry-module) section in the module documentation.

The starter kit demonstrates telemetry integration in the `actions/customer/commerce` workflow, specifically in the `consumer` and `created` actions. These examples use:

- Telemetry configuration: [`actions/telemetry.js`](https://github.com/adobe/commerce-integration-starter-kit/blob/main/actions/telemetry.js)
- Metrics definitions: [`actions/customer/commerce/metrics.js`](https://github.com/adobe/commerce-integration-starter-kit/blob/main/actions/customer/commerce/metrics.js)

**Key points:**

- Instrumentation is minimally invasive and does not disrupt existing logic.
- Telemetry is opt-in:
- Instrument each runtime action individually.
- Configure exporters in [`telemetry.js`](https://github.com/adobe/commerce-integration-starter-kit/blob/main/actions/telemetry.js).
- Set the `ENABLE_TELEMETRY` environment variable to `true` in each action's `inputs` section.
- To fully enable telemetry, complete your configuration in [`telemetry.js`](https://github.com/adobe/commerce-integration-starter-kit/blob/main/actions/telemetry.js).

The provided integration supports all three OpenTelemetry signals, **traces**, **metrics**, and **logs**, and enables automatic context propagation. For example, triggering the `consumer` action will generate a unified trace that spans the entire execution flow, including any instrumented downstream actions like `created`.

### Running a local telemetry stack

A ready-to-use Docker Compose setup is included for running a local telemetry stack, refer to the [Grafana use case](https://github.com/adobe/commerce-integration-starter-kit/blob/main/packages/aio-lib-telemetry/docs/use-cases/grafana.md) for more information.

To start the stack, run:

```bash
docker-compose up
```
Loading