Skip to content

feat: adding OpenTelemetry option#1121

Open
kazagz wants to merge 1 commit intoelastic:mainfrom
kazagz:feature/otel-reporter
Open

feat: adding OpenTelemetry option#1121
kazagz wants to merge 1 commit intoelastic:mainfrom
kazagz:feature/otel-reporter

Conversation

@kazagz
Copy link
Copy Markdown

@kazagz kazagz commented Mar 8, 2026

closes #1120

Description

This feature allows sending telemetry data about journeys to OTEL endpoints. It can be enabled by setting otel: true in SyntheticsConfig (aka synthetics.config.ts) or by adding --otel flag when running from command line. Endpoints, protocols and other parameters are being set with standard OTEL environment parameters. Example below:

export OTEL_EXPORTER_OTLP_ENDPOINT="https://your-otel.net"
export OTEL_EXPORTER_OTLP_PROTOCOL="grpc"
export OTEL_SERVICE_NAME="elastic-synthetics"
export OTEL_RESOURCE_ATTRIBUTES="deployment.environment.name=dev"

If --rich-events are enabled, it will also record network and console events.

Journey

Nothing changes in journey definition.

import { step, monitor, journey } from '@elastic/synthetics';

journey('www.elastic.co', ({ page }) => {
  monitor.use({
    id: 'elastic',
    schedule: 5,
    enabled: true,
    tags: ['elastic', 'test'],
    fields: {
      pull: '1121',
      repo: 'https://github.com/elastic/synthetics',
    },
  });

  step('Open Elastic page', async () => {
    await page.goto('https://www.elastic.co/');
  });

  step('Explore Elastic', async () => {
    await page.getByRole('link', { name: 'Explore Elastic' }).click();
  });
});

Trace

These are details you see when journey is executed and traces sent to EDOT.

elastic

Dependencies

Dependency view shows all easy to understand information about all connections made by journey.

elastic2

@kazagz kazagz force-pushed the feature/otel-reporter branch 2 times, most recently from 03eae75 to 650bf73 Compare March 10, 2026 14:24
@kazagz kazagz force-pushed the feature/otel-reporter branch from 82d4ee6 to 4021154 Compare March 11, 2026 19:13
@kazagz kazagz marked this pull request as ready for review March 11, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Allow setting custom reporter in config or add OpenTelemetry exporter flag

1 participant