Skip to content

[3.0] Extensions pre-release fixes (dist bundles test/examples; statsd DNS on probe thread; stddev overflow) #889

Description

@jbachorik

Summary

Pre-release fixes for btrace-extensions/* — one packaging defect and two correctness/safety bugs, plus a stale manifest version. Grouped from the module review.

Items

  • MAJOR — dist bundles non-shippable extensions. The dist auto-bundles every subproject that applies the extension plugin, with no allow-list, so the integration-test-only btrace-ext-test and both examples/* extensions (whose own READMEs say "not maintained as part of core BTrace") ship in the released extensions/ dir. btrace-dist/build.gradle:516-532. Fix: add an explicit allow-list of extensions to bundle.
  • MAJOR — statsd blocking DNS + socket-per-call on the probe thread. StatsdImpl.increment() opens a fresh DatagramSocket and does a blocking InetAddress.getByName() DNS lookup on the probe (application) thread on every call. StatsdImpl.java:32-50. Fix: resolve once and reuse a cached socket/address.
  • MAJOR — stddev silently corrupted by overflow. StatsMetricImpl accumulates sum-of-squares in a long (value*value), which overflows for realistic ns-latency inputs and silently corrupts stddev. StatsMetricImpl.java:54,94. Fix: use double accumulation (or a numerically stable online-variance algorithm).
  • MINOR — stale BTrace-API-Version: 2.3+. The gradle plugin hard-codes 2.3+ into every extension manifest while the loader default is 3.0+ (ExtensionMetadata.java:141). 3.0 satisfies 2.3+ so there is no functional gate today, but it is misleading and should track the current namespace/version. (Related to the gradle-plugin descriptor issue.)

Also worth reconciling: three descriptor-format variants coexist across the extensions (DSL + legacy @ExtensionDescriptor package-info + @ServiceDescriptor; DSL + @ServiceDescriptor; DSL-only), and the legacy package-infos hard-code version="1.0" that mismatches the manifest.

Owner: extensions / build team.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions