kieker-monitoring / kieker

Kieker's main repository
Apache License 2.0
70 stars 41 forks source link

[KIEKER-1973] Support ByteBuddy as Instrumentation Technology #1873

Open rju opened 1 week ago

rju commented 1 week ago

JIRA Issue: KIEKER-1973 Support ByteBuddy as Instrumentation Technology Original Reporter: David Georg Reichelt


Currently, Kieker probes can be injected via AspectJ, source instrumentation and DiSL (experimentally). Additionally, ByteBuddy should be supported.

rju commented 1 week ago

author DaGeRe -- Tue, 16 Jan 2024 21:36:26 +0100

Since its an important point of comparison, I’ve implemented javassist first. Furthermore, I’ll merge DiSL into the branch, so MooBench experiments can be executed with this branch.

rju commented 1 week ago

author DaGeRe -- Tue, 16 Jan 2024 22:03:28 +0100

The branch basically works, and also basic MooBench measurements are possible.

Currently, this only takes the class name from the KIEKER_PATTERNS (environment variable) and afterwards checks whether the class from the pattern matches an instrumented class. This should be extended by:

Additionally, we need to discuss how to pass the patterns. Since javassist has no aop.xml, we’d need to build our own implementation here (which makes sense; currently, the aop.xml patterns and kieker PatternParser patterns are kind of parallel structures).

rju commented 1 week ago

author DaGeRe -- Fri, 19 Jan 2024 18:51:56 +0100

Javassist works now, and I’ve additionally created a simple ByteBuddy implementation: https://stackoverflow.com/questions/77847943/initializing-non-primtive-field-by-bytebuddy-in-aspect Unfortunately, I didn’t find a way to initialize the fields that Kieker needs, so I’ve created a stackoverflow question: https://stackoverflow.com/questions/77847943/initializing-non-primtive-field-by-bytebuddy-in-aspect But it seems like this isn’t possible yet.

rju commented 1 week ago

author DaGeRe -- Tue, 6 Aug 2024 10:53:50 +0200

For this ticket, only javassist is missing, but the merge is blocked by the BuildScript error (https://kieker-monitoring.atlassian.net/browse/KIEKER-1989 )