k6tohoneycomb

package module
v0.0.0-...-b823a51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2021 License: ISC Imports: 1 Imported by: 0

README

k6-to-honeycomb

k6-to-honeycomb is a program that sends k6 results into Honeycomb for visualization and analysis.

Getting Started

k6-to-honeycomb is a Go program, the most straightforward way to install it is to first install Go 1.17+.

$ go install github.com/tmc/k6-to-honeycomb/cmd/k6-to-honeycomb@latest

This will place a k6-to-honeycomb binary into your $GOPATH/bin directory which by default is located at $HOME/go/bin. Typically you would place that directory into your system's PATH.

Configuration

The Honeycomb write API key can be provided with the -k command line flag. If not provided it will attempt to be read from the HC_API_KEY environment variable.

Example Use

Here is an exmaple of running k6 with streaming JSON output that this program can ingest and ship off to honeycomb.

Example k6 invocation (note --out json= parameter):

$ k6 run -u 1 -d 10s --out json=./output.json

You can then ship these events to honeycomb like so:

$ k6-to-honeycomb output.json

By default this will send to a k6-load-tests dataset but this is configurable with the -d parameter like so:

$ k6-to-honeycomb -d k6-load-test-results output.json

Example Results

Example Results

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K6DataPoint

type K6DataPoint struct {
	Type   string `json:"type,omitempty"`
	Metric string `json:"metric,omitempty"`
	Data   struct {
		Tags  map[string]string `json:"tags,omitempty"`
		Time  time.Time         `json:"time,omitempty"`
		Value float64           `json:"value,omitempty"`
	} `json:"data,omitempty"`
}

K6DataPoint represents a datapoint streamed from k6.

Directories

Path Synopsis
cmd
k6-to-honeycomb
Command k6-to-honeycomb streams k6 load test output into a Honeycomb dataset.
Command k6-to-honeycomb streams k6 load test output into a Honeycomb dataset.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL