inoxth_edot_flutter 0.1.0-dev.1 copy "inoxth_edot_flutter: ^0.1.0-dev.1" to clipboard
inoxth_edot_flutter: ^0.1.0-dev.1 copied to clipboard

Unofficial Flutter plugin for the Elastic Distribution of OpenTelemetry (EDOT) mobile Agents. Not affiliated with or endorsed by Elastic N.V.

example/README.md

inoxth_edot_flutter examples #

Three example apps, each a complete Flutter app that integrates the plugin a different way. Pick the one whose navigation matches your app - they share the same demo screens through the shared package, so the only real difference between them is how each wires EdotNavigatorObserver.

Flavor Navigation What to copy from it
basic None - one screen The smallest integration: start the Agent from .env, then emit a span, a metric, a log, a reported error, and read the Session identifier. No navigation, no network.
navigator Flutter Navigator (named routes) The reference flavor. Home / Demos / Settings, a screen per telemetry area (logs at every severity, all three network paths, an interaction span, an in-page views screen tracked by EdotViewObserver, more), a parametric route that normalizes its Screen Name, and EdotNavigatorObserver on MaterialApp.navigatorObservers. Also hosts the Seam 2 tests.
go_router go_router The same demo routed with go_router - EdotNavigatorObserver via GoRouter.observers, context.push to open a screen.

shared is not a flavor: it holds the demo screens and primitives the three apps reuse, which is why each main.dart reads as little more than the navigation wiring.

Reading these from pub.dev? They ship in the published package, but they will not run from it. Each flavor depends on shared through the pub workspace, and the workspace root is not part of the tarball - so extracted on its own, none of them resolves. Clone the repository to run them; from pub.dev they are worked examples to read.

Common setup #

Every flavor reads its configuration from a .env file (via flutter_dotenv). Copy the template, point it at your collector, and run:

cd basic            # or navigator, or go_router
cp .env.example .env
flutter run

Set EDOT_SERVER_URL in .env to your collector's OTLP/HTTP endpoint. On an Android emulator the collector on your host machine is usually http://10.0.2.2:4318. With no EDOT_SERVER_URL set, an app shows a "Missing .env" screen instead of starting the Agent, so a fresh clone runs without configuration. Beyond the server URL and identity fields, .env can also set the OTLP transport (EDOT_EXPORT_PROTOCOL, http or grpc) and the session sampling rate (EDOT_SESSION_SAMPLING_RATE, 0.0-1.0). See each flavor's .env.example for the full set of keys.

0
likes
0
points
60
downloads

Publisher

unverified uploader

Weekly Downloads

Unofficial Flutter plugin for the Elastic Distribution of OpenTelemetry (EDOT) mobile Agents. Not affiliated with or endorsed by Elastic N.V.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http

More

Packages that depend on inoxth_edot_flutter

Packages that implement inoxth_edot_flutter