These pages show Cloud's URLs. Sign in on Dedicated and they show your server's.

Getting started

From a first look at OpenTelemetry to your own trace in the Observatory. Each step builds on the one before, so go in order.

About OpenTelemetry

Start with OpenTelemetry

FEx is built on OpenTelemetry (OTel), the open standard for recording what software does. FEx follows the OpenTelemetry specification closely: the names, the data and the way it is sent are the standard ones. What you learn about OpenTelemetry applies to FEx, and what you build with FEx stays standard OpenTelemetry.

The specification is approachable. Before you go further, spend an hour with the OpenTelemetry documentation for a basic understanding:

The three signals

OpenTelemetry records three kinds of data, called signals:

Traces
What happened, step by step, and how long each step took. A trace is a tree of spans: a tap, the network call it made, the server work behind that call, the database query under it. One trace can cross from your app into your server.
Metrics
Numbers measured over time: frame times, memory, requests per minute, errors per release. Cheap to keep, so they show trends and set off alerts.
Logs
Lines of text with a time and a severity. In OpenTelemetry a log carries the trace it was written in, so from a log you can open everything else that happened in that moment.

All three carry a resource: which app sent them, which version, on which device. FEx adds Real User Monitoring on top (sessions, screens, taps and replay), recorded as standard signals too. The Overview explains the other words these pages use.

BUILDFEX ARCHITECTUREUSERStokensissuesPub tokenpushCI exchangeapps ship to users: app stores, the web, serverssymbolscrashesstack tracessourcetelemetryDeveloper Computerflutter run · dart pub getCIGitHub Actions, GitLab, …Control Roommint tokens · role-based access controlControl Planeorganizations · roles · tokensFEx Pubpackages · sourceObservatorysessions · traces · logsSymbolizercrashes → source linesFEx AIanswers from bothIssue TrackerGitHub · Jira · LinearMobile + Desktop Appsphones · tablets · desktopssends with an OTLP tokenWeb Appsin browserssends with a Browser OTLP tokenDart Serversbackends · servicessends with an OTLP token

1. Sign in

Sign in to fex.flutterrific.io. The first time, you set up your organization: the account your tokens, teammates and plan belong to. If a teammate invited you, sign in with the invited email address and you join their organization instead.

Signing up starts your organization on Cloud Free, with no card. You are asked for:

  • Organization and subdomain: its name, and the subdomain your apps send telemetry to. The subdomain is yours for good.
  • Region: where your telemetry is stored. It cannot be changed later.
  • RUM limit: the highest replay level your engine may record. Cloud Free goes up to Wireframe; Shadow and Pixel are in the paid plans. Your engine is forged with your choice, and nothing on the device can go past it.
  • FEx AI: it runs on your own model key, which you can add then or later.

For FEx Pub alone, choose a Pub plan on Pricing before you sign up. You name your organization and choose its region, and nothing more is asked.

You land in the Control Room. Organization shows your organization's name and id.

2. Download the Reference Demo

Press Reference Demo at the top of the Control Room and unpack it. You will run it in step 5: it is the fastest way to see FEx work, and its code shows how to use every feature. .

3. Connect dart pub to your FEx Pub

The FEx packages come from your FEx Pub, not pub.dev, and dart pub needs a token to read from it. Most developers have never done this before; it takes a minute, once per computer.

FEx Pub is also a pass-through to pub.dev. Define your packages in pubspec.yaml as you always have, and the ones from pub.dev resolve from pub.dev automatically, alongside the FEx packages and your private ones.

  1. In the Control Room, go to Tokens:
    The Control Room's Tokens screen: Generate Token, with + Pub, + Symbolizer, + OTLP and + Browser OTLP
  2. Mint a Pub token: press + Pub. The dialog opens:
    The Generate Pub Token dialog: Name, what the token grants, the organization, and Allow write (publish) access
    • Name: any name that tells your tokens apart; we recommend pub-org-read-write.
    • Organization: the organization whose packages this token reads and publishes.
    • Allow write (publish) access: check it to publish to your FEx Pub with this token. Without it the token can only read, which is all the Reference Demo needs except symbolizer_demo_flutter and crash_demo_flutter, which publish to your Pub.
  3. Click Generate. Your token is shown once:
    The new Pub token: its Token ID, the secret token with a copy button, the dart pub token add command, and Granted scopes: Pub
    Copy the token with its copy button now: once you close this dialog it cannot be shown again. Granted scopes: Pub means this token is only for Pub: it cannot send telemetry or call any other service.
  4. In a command shell, give the token to dart pub:
    shell
    dart pub token add https://pub.fex.flutterrific.io
    When it prompts Enter secret token:, paste the token and press Enter. The prompt shows nothing as you paste; that is expected. It answers:
    terminal
    Enter secret token:
    Requests to "https://pub.fex.flutterrific.io" will now be authenticated using the secret token.
  5. In the Reference Demo's folder, fetch its packages:
    shell
    flutter pub get
    If it succeeds, your Pub and your token work.

dart pub keeps the token for that host and sends it only there. Pub covers listing, replacing and removing tokens, and publishing.

Which packages a Pub token reaches

A Pub token reaches the packages its owner may use, and no more.

  • Organization admins have every package in the organization, so their tokens do too.
  • Other teammates can only mint tokens for the packages they have been given. An admin grants packages to a teammate.

See Invite teammates for roles, and Pub for granting packages to org members.

4. Let your app send telemetry

On Tokens, mint an OTLP token, then export it in your shell in OpenTelemetry's standard form. Keep authorization lowercase:

shell
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer <your OTLP token>"

5. Run the demo

With Docker running, start the weather demo from the Reference Demo's folder and pick a device:

shell
tool/launch.sh weather_flutter

Tap to fetch the weather. That tap starts a trace that runs through the app, the weather API, its cache and the outside weather service.

6. See it in the Observatory

Your tap reaches the Observatory within seconds. The app links to what it sent: follow its link to open the trace and see every step and how long it took.

Next