Skip to content

fix: v2.2.1 — bundle slf4j-nop for standalone agent mode#30

Merged
muktaa merged 4 commits intomainfrom
feat/core-router-and-sql-span-naming
Mar 13, 2026
Merged

fix: v2.2.1 — bundle slf4j-nop for standalone agent mode#30
muktaa merged 4 commits intomainfrom
feat/core-router-and-sql-span-naming

Conversation

@prathamesh-sonpatki
Copy link
Member

@prathamesh-sonpatki prathamesh-sonpatki commented Mar 7, 2026

Summary

  • Fix standalone agent crash: The vertx3-otel-agent JAR crashed with NoClassDefFoundError: org/slf4j/LoggerFactory when used as -javaagent because the shade plugin excluded SLF4J from agent-impl.jar. In agent mode, the app classpath isn't available at premain time.
  • Bundle slf4j-nop in the shaded JAR as a fallback binding. The app's real binding (logback) takes precedence since appendToSystemClassLoaderSearch appends after the app classpath.
  • Remove SLF4J from OtelAgent.java, use System.err instead (consistent with AgentBootstrap).
  • Version bump to 2.2.1

Test plan

  • Downloaded 2.2.0 from Maven Central — confirmed NoClassDefFoundError: org/slf4j/LoggerFactory
  • Built 2.2.1 locally — agent loads, all 15 ByteBuddy transformers install
  • With logback on classpath: SLF4J correctly selects logback over nop
  • Without full app classpath: graceful degradation — app starts with warning

🤖 Generated with Claude Code

…Easy, auto log correlation

- DB span names follow OTel convention: {OPERATION} {db.name}.{table}
- Reactive SQL db.name, net.peer.name, net.peer.port from connection options
- RESTEasy (JAX-RS) http.route from @path annotations
- Core Router auto-instrumentation (non-RxJava) with dedup
- HTTP client traceparent injection and response status code
- Aerospike batch operation coverage
- Jedis Redis instrumentation (Connection.sendCommand)
- Lettuce Redis instrumentation (AbstractRedisAsyncCommands.dispatch)
- Raw JDBC Statement instrumentation (execute* methods)
- Auto log-trace correlation (MdcTraceTurboFilter + OpenTelemetryAppender)
- EC2 deployment options in README
- Docker ARG VERSION in agent Dockerfiles
- Bump central-publishing-maven-plugin to 0.7.0
- README redesigned with complete feature coverage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@prathamesh-sonpatki prathamesh-sonpatki force-pushed the feat/core-router-and-sql-span-naming branch from 63d51a5 to ce0aaca Compare March 9, 2026 05:17
prathamesh-sonpatki and others added 3 commits March 10, 2026 16:39
AgentBootstrap.premain() initialized OTel SDK before installing ByteBuddy
transformers, causing CLIENT spans (Aerospike, Kafka, HTTP, JDBC) to be
silently lost when SDK init triggered class loading of application clients.

Changes:
- AgentBootstrap: swap steps 3/4 — install transformers FIRST, then SDK init
- Vertx3Instrumenter: upgrade instrumentation skip logs from debug to warn,
  add loaded flag to onTransformation log for diagnosing retransform issues
- ResteasyDispatchHelper: fix route template extraction to scan all methods
  instead of short-circuiting on first no-@path match; match by segment count

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve conflicts from release/2.1.0 merge (PR #29) — keep 2.2.0
version and our branch's superset of changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The standalone agent (vertx3-otel-agent) crashed with
NoClassDefFoundError: org/slf4j/LoggerFactory when loaded as
-javaagent because the shade plugin excluded slf4j-api from
agent-impl.jar. In agent mode, the app classpath isn't available
when premain runs, so classes with static SLF4J loggers
(OtelAgent, Vertx3Instrumenter) failed during <clinit>.

- Bundle slf4j-nop in the shaded JAR as a fallback SLF4J binding.
  The app's real binding (logback) takes precedence since
  appendToSystemClassLoaderSearch appends after the app classpath.
- Remove SLF4J from OtelAgent.java, use System.err instead
  (consistent with AgentBootstrap, avoids early classloading).
- Bump version to 2.2.1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@prathamesh-sonpatki prathamesh-sonpatki changed the title Feat/core router and sql span naming fix: v2.2.1 — bundle slf4j-nop for standalone agent mode Mar 12, 2026
@muktaa muktaa self-requested a review March 13, 2026 07:06
@muktaa muktaa merged commit 31d82e0 into main Mar 13, 2026
2 checks passed
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