How to use libhoney - 2 common examples

To help you get started, we’ve selected a few libhoney examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gatsbyjs / gatsby / infrastructure / functions / onGithubWebhook / handler.js View on Github external
// handler.js

"use strict"
const Libhoney = require("libhoney").default
const flatten = require("flat")
const GraphQLClient = require("graphql-request").GraphQLClient

const hny = new Libhoney({
  writeKey: process.env.HONEYCOMB_KEY,
  dataset: "gatsbyjs-os.lambda.github-webhook",
})

console.log(`env vars`, process.env)

const client = new GraphQLClient(
  "https://api.graph.cool/simple/v1/cj8xuo77f0a3a0164y7jketkr",
  {
    headers: {
      Authorization: `Bearer ${process.env.GRAPHCOOL_TOKEN}`,
    },
  }
)

function createBranch(branch) {
github zeit / tracing-js / src / tracer.ts View on Github external
constructor(tracerOptions: TracerOptions, honeyOptions: TracerHoneyOptions) {
    this.tracerOptions = tracerOptions;
    this.tracerOptions.sampler =
      tracerOptions.sampler || new DeterministicSampler(1);
    if (honeyOptions instanceof Libhoney) {
      this.honey = honeyOptions;
    } else {
      this.honey = new Libhoney(honeyOptions);
    }
  }
  startSpan(name: string, spanOptions: SpanOptions = {}) {

libhoney

Honeycomb.io Javascript library

Apache-2.0
Latest version published 8 months ago

Package Health Score

77 / 100
Full package analysis

Popular libhoney functions

Similar packages