Skip to content

fix(extensions): harden pre-release packaging and metrics#909

Merged
jbachorik merged 4 commits into
developfrom
agent/issue-889-extensions
Jul 19, 2026
Merged

fix(extensions): harden pre-release packaging and metrics#909
jbachorik merged 4 commits into
developfrom
agent/issue-889-extensions

Conversation

@jbachorik

@jbachorik jbachorik commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the four extension pre-release defects from #889:

  • The distribution now packages an explicit allow-list of maintained extensions, excluding test and example modules.
  • The ExternalType integration path stages btrace-ext-test in an isolated test-only client home rather than release output.
  • StatsD resolves its endpoint and opens one UDP socket during extension initialization, then closes it on detach.
  • Metrics use a double-valued square accumulator so large latency values do not corrupt standard deviation.
  • Generated extension API JARs now declare BTrace-API-Version: 3.0+.

Why

Previously every extension subproject was released automatically, StatsD performed blocking DNS and socket allocation for each probe call, and long square overflow silently produced incorrect standard deviations.

Validation

  • :btrace-extensions:btrace-metrics:test :btrace-extensions:btrace-statsd:test
  • :btrace-dist:test
  • :btrace-gradle-plugin:test
  • git diff --check

The focused ExternalType integration test is included in the change but was not run in this session.


This change is Reviewable

@jbachorik
jbachorik requested a review from Copilot July 18, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jbachorik
jbachorik marked this pull request as ready for review July 18, 2026 12:57
@jbachorik
jbachorik requested a review from Copilot July 19, 2026 08:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

increment() now reads an immutable Endpoint snapshot from a volatile
field instead of holding a lock during socket.send(), so concurrent
instrumented threads no longer serialize on the hot path. initialize()
and close() still coordinate the endpoint swap, but the old socket is
closed outside that lock.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jbachorik
jbachorik merged commit f8a66a3 into develop Jul 19, 2026
15 checks passed
@jbachorik
jbachorik deleted the agent/issue-889-extensions branch July 19, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants