0.1.1 • Published 5 years ago
opentelemetry-exporter-honeycomb v0.1.1
OpenTelemetry Honeycomb Trace Exporter
OpenTelemetry Honeycomb Trace Exporter allows the user to send collected traces to Honeycomb.
Installation
npm install --save opentelemetry-exporter-honeycombUsage in Node
You will need a write key for your team and a dataset name (the dataset need not exist yet)
Install the exporter on your application and pass the options. serviceName is an optional string. If omitted, the exporter will first try to get the service name from the Resource. If no service name can be detected on the Resource, a fallback name of "OpenTelemetry Service" will be used.
const { HoneycombExporter } = require('opentelemetry-exporter-honeycomb');
const options = {
dataset: 'your-dataset'
writeKey: 'your-write-key'
serviceName: 'your-application-name'
}
const exporter = new HoneycombExporter(options);Now, register the exporter and start tracing.
tracer.addSpanProcessor(new BatchSpanProcessor(exporter));You can use built-in SimpleSpanProcessor or BatchSpanProcessor or write your own.
- SimpleSpanProcessor: The implementation of
SpanProcessorthat passes ended span directly to the configuredSpanExporter. - BatchSpanProcessor: The implementation of the
SpanProcessorthat batches ended spans and pushes them to the configuredSpanExporter. It is recommended to use thisSpanProcessorfor better performance and optimization.
Viewing your traces
Go to https://ui.honeycomb.io
Useful links
- For more information on OpenTelemetry, visit: https://opentelemetry.io/
- For more about OpenTelemetry JavaScript: https://github.com/open-telemetry/opentelemetry-js
- For Honeycomb info see https://honeycomb.io/
License
Apache 2.0 - See LICENSE for more information.