Skip to content

kasianov-mikhail/swift_metrics_bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📈 Swift Metrics Bridge

Flutter bridge to Apple's swift-metrics

CI pub package license

Counter · FloatingPointCounter · Timer


Note

iOS only.

📦 Installation

dependencies:
  swift_metrics_bridge: ^0.1.0

🚀 Usage

import 'package:swift_metrics_bridge/swift_metrics_bridge.dart';

// Integer counter
const counter = Counter('button_taps');
await counter.increment();
await counter.increment(value: 5);

// Floating-point counter
const revenue = FloatingPointCounter('revenue');
await revenue.increment(value: 9.99);

// Timer
const timer = MetricsTimer('api_latency');
await timer.record(Duration(milliseconds: 250));
await timer.recordNanoseconds(1500);

⚙️ How It Works

Each metric instance maps to a corresponding swift-metrics type on iOS via method channels. By default, swift-metrics uses a no-op backend — configure a backend like Scout on the iOS side to persist metrics.

About

Flutter bridge to Apple's swift-metrics

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors