# registerHoneycombInstrumentation

Initialize an instance of Honeycomb Web SDK and registers custom instrumentation to monitor the performance of a Squide application.

# Reference

registerHoneycombInstrumentation(runtime, serviceName, apiServiceUrls: [string | Regex], options?: {})

# Parameters

  • runtime: A FireflyRuntime instance.
  • serviceName: Honeycomb application service name.
  • apiServiceUrls: A RegExp or string that matches the URLs of the application's backend services. If unsure, use the temporary regex /.+/g, to match all URLs.
  • options: An optional object literal of options:
    • Accepts most of the predefined options of the registerHoneycombInstrumentation function provided by @workleap/honeycomb.
    • debug: An optional boolean value indicating whether or not to log debug information to the console. true by default when the runtime mode is set to development.

# Returns

Nothing

# Usage

# Register instrumentation

import { FireflyRuntime } from "@squide/firefly";
import { registerHoneycombInstrumentation } from "@squide/firefly-honeycomb";

const runtime = new FireflyRuntime();

registerHoneycombInstrumentation(runtime, "squide-sample", [/.+/g,], {
    endpoint: "https://squide-collector"
});

# Use an API key

import { registerHoneycombInstrumentation } from "@squide/firefly-honeycomb";

registerHoneycombInstrumentation(runtime, "squide-sample", [/.+/g,], {
    apiKey: "xyz123"
});

# Customize backend URLs

Specify values for the apiServiceUrls argument that matches your application's backend URLs. For example, if your backend services are hosted at https://workleap.com/api:

import { registerHoneycombInstrumentation } from "@squide/firefly-honeycomb";

registerHoneycombInstrumentation(
    runtime, "squide-sample", 
    [/https:\/\/workleap.com\/api\.*/], 
    { endpoint: "https://squide-collector" }
);