The definite guide to Java agents
summary
Explains how to build real Java agents using Byte Buddy and the Instrumentation API, showing exact premain/agentmain bootstrapping, how to register transformers, and when to use retransformClasses. Demonstrates templates-as-classes instead of bytecode, compares runtime cost to ASM and AspectJ, highlights limits like final classes/methods that cannot be redefined, and shows performance numbers for monitoring hooks and GC pressure when instrumenting millions of objects so you can judge feasibility.
AI-written summary · about
chapters (7)
- 0:00Introduction to Java agents
- 8:08Instrumentation interface basics
- 20:11Dynamic class transformation
- 35:57Agent implementation challenges
- 48:05Performance monitoring with agents
- 53:18Advanced agent use cases
- 1:00:33Q&A and closing remarks
related talks
30mWriting Java agents for fun and not so much profit
45mMaking Java more dynamic
41mInstrument to Remove: Using Java agents for fun and profit
39mThe Java Agent: Modifying Bytecode at Runtime to Protect Against Log4J
55mMaking Java More Dynamic
36mThe Magic of OpenTelemetry: Rewriting Your App in Production
59mTools & Tips to Modernize Your Java code with AI
55mLiving in the Matrix with Bytecode Manipulation
