Repository navigation
Tags
Tags
Merge pull request #12 from pabloos/chore/exporters-v0.8.0 Bump exporters to flow v0.8.0 for the Metrics rename
Merge pull request #11 from pabloos/feat/exporters-attrs Implement Meter attributes in both exporters
Merge pull request #9 from pabloos/chore/exporters-flow-v0.6.0 Bump exporters to flow v0.6.0 and assert the worker idle/blocked metrics
Merge pull request #12 from pabloos/chore/exporters-v0.8.0 Bump exporters to flow v0.8.0 for the Metrics rename
Merge pull request #11 from pabloos/feat/exporters-attrs Implement Meter attributes in both exporters
Merge pull request #9 from pabloos/chore/exporters-flow-v0.6.0 Bump exporters to flow v0.6.0 and assert the worker idle/blocked metrics
Merge pull request #7 from pabloos/feat/otel-exporter Add OpenTelemetry exporter as a separate module (x/otel)
Settle the remaining pre-v1.0 API warts
Five breaking changes from the API review, all of which only fit before v1.0.
Report.String and Util take value receivers. With a pointer receiver
fmt.Println(rep) silently printed the raw struct: the README itself had to
write &rep, and every Fatalf in observe_test.go carried the same workaround.
Pointer call sites keep working, since the pointer method set includes these.
StageError wraps whatever stopped a run, naming the end it came from, so a
caller can tell a failing sink from failing work without instrumenting its own
ends. Unwrap keeps the original reachable, so existing errors.Is assertions are
untouched. A caller-cancelled run still returns the bare context error: no
stage failed, so there is nothing to name.
Prefetch no longer applies twice in the partitioned path. It buffered the
shared intake *and* every worker queue, holding Prefetch*(Workers+1) items —
measured 53 in flight for Prefetch(10), Workers(4) where Run held 15. The
intake is now unbuffered there, so the per-worker queues are the whole window:
45, i.e. Prefetch*Workers plus bounded slack. A test pins both windows.
hashKey gets fast paths instead of routing every key through fmt. Strings and
the integer types are now hashed inline and allocation-free; a uint64 key is
taken as the hash itself, which gives callers control of the distribution with
no new API. Measured, string keys: 145ns/2 allocs -> 6.4ns/0 allocs; int keys
2.2ns. The fallback moves from %v to %#v and so gets slower (233ns -> 431ns),
deliberately: %v flattens a struct's fields into one line, so {"x y","z"} and
{"x","y z"} hashed alike and shared a worker. Correctness in the slow path,
speed in the paths people actually hit.
WithMeter becomes Metrics, the only option that carried a With prefix.
x/prometheus and x/otel still pin v0.7.0, so they are unaffected until bumped;
the rename is the one change that will touch them.
PreviousNext