rollupsql

package
v0.0.0-...-691c381 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rollupsql builds DuckDB expressions over the analytical span cache. Its arguments are SQL fragments owned by the caller.

Index

Constants

View Source
const (
	Served     = "coalesce(kind,'') NOT IN ('SPAN_KIND_CLIENT','SPAN_KIND_PRODUCER')"
	ErrorSpans = "coalesce(sum(spans) FILTER (WHERE status='STATUS_CODE_ERROR'),0)"
	ErrorRate  = "(" + ErrorSpans + "::DOUBLE / nullif(sum(spans),0))"
)

Variables

This section is empty.

Functions

func Bin

func Bin(duration string) string

Bin maps a duration in milliseconds to a scale-3 exponential histogram key.

func Interpolate

func Interpolate(q, k, n, cum, total string) string

Interpolate locates the rank linearly within (2^((k-1)/8), 2^(k/8)]. Zero has its own sentinel. At k >= 8192 the upper edge exceeds DOUBLE's finite range, so saturate before computing the width of that bin.

func NamespaceServiceWindow

func NamespaceServiceWindow(where, bucket string) string

NamespaceServiceWindow keeps each namespace's counts and latency population independent.

func Quantile

func Quantile(q, k, n, cum, total string) string

Quantile reduces cumulative, nonempty bins to one quantile per group.

func ServiceWindow

func ServiceWindow(where, bucket string) string

ServiceWindow groups span_rollup by service and an optional bucket expression. Counts include all spans. Only latency prefers work performed by the service, falling back to outbound calls when they are its whole window.

Types

This section is empty.

Jump to

Keyboard shortcuts

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