SigNoz
Docs
PricingCustomers
Get Started - Free
Docs
IntroductionContributingMigrate from DatadogSigNoz API
OpenTelemetry
What is OpenTelemetryOpenTelemetry Collector GuideOpenTelemetry Demo
Community
Support
Slack
X
Launch Week
Changelog
Dashboard Templates
DevOps Wordle
Newsletter
KubeCon, Atlanta 2025
More
SigNoz vs DatadogSigNoz vs New RelicSigNoz vs GrafanaSigNoz vs Dynatrace
Careers
AboutTermsPrivacySecurity & Compliance
SigNoz Logo
SigNoz
All systems operational
HIPAASOC-2
SigNoz Cloud - This page applies to SigNoz Cloud editions.
Self-Host - This page applies to self-hosted SigNoz editions.

Android/iOS App in Flutter Instrumentation

Overview

This document contains instructions on how to set up OpenTelemetry instrumentation in your Flutter applications and view traces in SigNoz.

The package used here is an unofficial OpenTelemetry implementation.

Prerequisites

  • A Flutter application (Android and/or iOS targets).
  • Flutter SDK installed; see the Flutter install guide.
  • Access to a SigNoz Cloud account or self-hosted SigNoz instance.

Send traces to SigNoz

Test the sample app for Flutter (replace the variables inside main.dart).

Step 1: Install the OpenTelemetry package

flutter pub add opentelemetry

Step 2: Initialize the tracer

Add imports to main.dart:

lib/main.dart
import 'package:opentelemetry/api.dart';
import 'package:opentelemetry/sdk.dart';

Configure the exporter and tracer provider:

lib/main.dart
final headers = {
  'signoz-ingestion-key': '<your-ingestion-key>', // Cloud only: paste your ingestion key
};

final exporter = CollectorExporter(
  Uri.parse('ingest.<region>.signoz.cloud:443/v1/traces'), // Cloud endpoint (keep https)
  headers: headers,
);

final processor = BatchSpanProcessor(exporter);
final provider = TracerProviderBase(
  processors: [processor],
  resource: Resource([
    Attribute.fromString('service.name', '<service_name>'),
    Attribute.fromString('service.version', '<service_version>'),
  ]), // set your service name and version
);

registerGlobalTracerProvider(provider);

Verify these values:

  • <your-ingestion-key>: Your SigNoz ingestion key
  • <region>: Your SigNoz Cloud region
  • <service_name>: service name that will show up under Traces Explorer in SigNoz.
  • <service_version> (optional): Your release version, image tag, or git SHA (e.g., 1.4.2, a01dbef8).

Set service.version to a per-build value, not a static string. SigNoz detects a deployment each time this value changes. Common sources:

  • Bash / shell: service.version=$(git rev-parse --short HEAD)
  • GitHub Actions: service.version=${{ github.sha }}
  • GitLab CI: service.version=$CI_COMMIT_SHORT_SHA
  • Kubernetes: inject from your Helm chart image tag or CI variable

Using self-hosted SigNoz? Most steps are identical. Update the endpoint and remove the ingestion key header as shown in Cloud → Self-Hosted.

Step 3: Create spans

lib/main.dart
final _tracer = provider.getTracer('flutter-example');

void createSpan(String inputText) {
  final rootSpan = _tracer.startSpan('root-span');
  try {
    final childSpan = _tracer.startSpan('child-span', kind: SpanKind.client); // child span example
    try {
      childSpan.setAttribute(Attribute.fromString('input.name', inputText));
      // add your work here
      childSpan.addEvent('Processed input: $inputText');
    } finally {
      childSpan.end();
    }
  } finally {
    rootSpan.end();
  }
}

Step 4: Run the app

Run from Android Studio or an iOS simulator.

Validate

  • In SigNoz, go to Traces Explorer and confirm that the traces for your service (for example <service_name>) are present.
  • Open a recent trace and verify that spans from your Flutter app are present with the attributes you set.

Troubleshooting

  • If spans do not show up, verify the exporter endpoint (Cloud or your self-hosted collector endpoint) and confirm the device/emulator can reach it over the configured protocol (HTTP/HTTPS).

Next steps

  • Explore your mobile traces in the Trace Explorer.
  • Create latency and error alerts for your service using Alert Management.

Last updated: May 14, 2026

Edit on GitHub

Was this page helpful?

Your response helps us improve this page.

Prev
Kotlin
Next
Integrations
On this page
Overview
Prerequisites
Send traces to SigNoz
Step 1: Install the OpenTelemetry package
Step 2: Initialize the tracer
Step 3: Create spans
Step 4: Run the app
Validate
Troubleshooting
Next steps

Is this page helpful?

Your response helps us improve this page.