libhoney_dart 0.1.0 copy "libhoney_dart: ^0.1.0" to clipboard
libhoney_dart: ^0.1.0 copied to clipboard

A Dart implementation of Honeycomb client library (or Libhoney) for Honeycomb.io

libhoney-dart #

A Dart library for sending events to Honeycomb. Built to follow the SDK spec presented by Honeycomb. Currently meets the minimum specifications with Response support.

I have not tested to see if this works in Flutter, although I have no reason to believe why it wouldn't. Any insight on that would be appreciated!

Usage #

The sample usage seen below is the same as usage in this example file

import "package:libhoney_dart/libhoney-dart.dart";

// Main function
void main() {
  Libhoney honey = Libhoney(writeKey: "API_KEY", dataset: "your_dataset");

  Event event = Event(honey);
  event.addField("user ID", 4829034023923094);
  event.addMap({
    "access": "member", 
    "crashed": false
  });
  event.metadata = "EVENT_1";

  // Awaiting this will force the code to wait for the response in honey.responseQueue
  event.send();
}

Contributing #

Features, bug fixes and other changes to libhoney-dart are gladly accepted. Please open issues or a pull request with your change.

All contributions will be released under the Apache License 2.0.

This library attempts to conform to the Effective Dart styling where possible. The primary exception is that the line limit is at 120 characters. This can be enforced through dart format --line-length 120

Testing #

Tests can be ran from the root directory with dart test. The test cases do not fully replicate responses from Honeycomb and as such any tests that require publishing upstream will need to be performed locally with your own API key and dataset.

The current test cases do not send any data upstream to Honeycomb, resulting in the necessity of locally testing any changes relating to upstream sending.

License #

libhoney-dart is released under the Apache 2.0 license as outlined in the README.md

0
likes
120
pub points
51%
popularity

Publisher

unverified uploader

A Dart implementation of Honeycomb client library (or Libhoney) for Honeycomb.io

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

http

More

Packages that depend on libhoney_dart