telemetry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package telemetry is the one place steps meets the OpenTelemetry SDK, off unless OTEL_* asks: the docker and GCE clients already trace against the global provider, so installing one is all their calls need.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enabled

func Enabled(getenv func(string) string, signal string) bool

Enabled answers whether the environment asks for a signal, TRACES or METRICS. The exporter would default to localhost:4318 with nothing set, which is a dial on every run nobody asked for, so an exporter or an endpoint has to be named.

func Handler

func Handler(untraced ...string) func(http.Handler) http.Handler

Handler traces every request a server answers but those to untraced paths, which a platform polls every few seconds. echo stamps the matched route onto the request, which otelhttp reads back to name the span by route rather than by URL.

func LogHandler

func LogHandler(inner slog.Handler) slog.Handler

LogHandler adds trace_id and span_id to a record logged under a recording span, so a log line can be found from its trace and back.

func ObserveQueue

func ObserveQueue(pending func(context.Context) map[string]int64) func()

ObserveQueue reports pending builds per pipeline as steps.queue.pending, asking pending at each export; the returned func stops it, and must run before whatever pending reads from is closed.

func Start

func Start(ctx context.Context, version string) (func(context.Context), error)

Start returns the flush a command must run before it exits, a no-op when telemetry is off.

func Transport

func Transport(base http.RoundTripper) http.RoundTripper

Transport traces every request a client makes and carries the trace context to the server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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