Skip to main content

vigil_backend 0.1.1 copy "vigil_backend: ^0.1.1" to clipboard
vigil_backend: ^0.1.1 copied to clipboard

Optional HTTP uploader that batches locally captured Vigil network calls and sends them to a protected backend ingest endpoint.

An optional uploader for sending calls captured by vigil_core to a backend ingest endpoint in bounded batches. Local capture continues even when upload is disabled or temporarily fails.

Installation #

dart pub add vigil_backend vigil_core

Usage #

import 'package:vigil_backend/vigil_backend.dart';
import 'package:vigil_core/vigil_core.dart';

Future<void> main() async {
  Vigil.instance.init();

  final connection = VigilBackendConnection.connect(
    config: VigilBackendConfig(
      endpoint: Uri.parse('https://dev-api.example.com/vigil/ingest'),
      ingestKey: const String.fromEnvironment('VIGIL_INGEST_KEY'),
      batchSize: 20,
      maxQueueSize: 500,
      clientInfo: const {'app': 'example'},
    ),
  );

  // Dispose the connection with the component or application that owns it.
  await connection.dispose();
}

Completed and failed calls are queued by default. A batch is removed only after a successful 2xx response; otherwise it remains for a later flush. The queue is memory-only and drops its oldest entries when maxQueueSize is reached.

The ingest key is sent in Vigil-Ingest-Key. A key embedded in a client app is not a secret, so combine it with development-only enablement, TLS, rate limits, and appropriate backend authentication when the endpoint is remotely reachable.

1
likes
160
points
467
downloads

Documentation

API reference

Publisher

verified publisherguptan404.com

Weekly Downloads

Optional HTTP uploader that batches locally captured Vigil network calls and sends them to a protected backend ingest endpoint.

Repository (GitHub)
View/report issues
Contributing

Topics

#network-monitoring #http #debugging #observability #developer-tools

License

BSD-3-Clause (license)

Dependencies

http, vigil_core

More

Packages that depend on vigil_backend