_latencystatussampler

command
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Command latencystatussampler is a post-trace sampler plugin that drops a trace when its duration (in milliseconds, read from the "duration" tag) is below a configured threshold AND its "status" tag equals a configured success value. All other traces are kept. The sampler fails open: if either column is absent, nil, empty, or decoding returns an error, the trace is retained.

Build it as a Go plugin (the leading-underscore directory is intentionally excluded from `go build ./...` and linters, exactly like the reference _example directory, yet remains buildable by explicit path):

CGO_ENABLED=1 go build -buildmode=plugin -trimpath \
  -o latencystatussampler.so \
  ./test/plugins/_latencystatussampler

Config JSON (from SamplerPlugin.config Struct):

{ "thresholdMs": 500, "successValue": "success" }

Both fields are optional; defaults are 500 and "success" respectively.

Jump to

Keyboard shortcuts

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