Search the docs

↑↓ to move · Enter to open · Esc to close

Type to search every page. Results are grouped by section.

TalariaDocs
Dashboard

Docs › SDKs

View as Markdown
On this page

Dart

Install talaria 0.4.1 and initialise with a server key.

talaria 0.4.1 is the official Dart SDK. Flutter apps should use talaria_flutter. Serverpod 4 servers should add talaria_serverpod.

Install#

dependencies:
  talaria: ^0.4.1

Initialise#

import 'dart:io';
 
import 'package:talaria/talaria.dart';
 
Future<void> main() async {
  await Talaria.init(TalariaOptions(
    apiKey: Platform.environment['TALARIA_API_KEY'] ?? '',
    release: '1.4.2',
    minLevel: SeverityLevel.warning,
  ));
  // Start your app here.
}

Use a secret tal_sk_… key (TALARIA_API_KEY) on the Dart VM. The key's cell selects https://ingest-<cell>.newtalaria.com unless url or TALARIA_URL is set. A self cell without one of those disables Talaria.

Init never throws.

Verify#

await Talaria.captureException(Exception('Talaria test error'), stackTrace: StackTrace.current);

Run this once, then open Issues in the dashboard. The test error shows as a new issue in the key's environment. Nothing there? See fail-safe.

Next#

See fail-safe, configuration, errors, and tracing.

Was this helpful?