Add deployment scope support and rename it-classloader to it-instrumentation#23
Merged
ylecaillez merged 4 commits intopingidentity:mainfrom Mar 24, 2026
Merged
Conversation
…ntation Add a 'scope' field to the deployment descriptor that controls which classes are instrumented. When scope is 'test', both target/classes and target/test-classes are combined into a single classes.jar, and test-scoped dependencies are included. - Add 'scope' field to ServiceDescriptor and TraceAuditorDescriptor - Remove dead instrumentTestClasses() method from Instrumentation - Accept List<Path> classesDirs in instrumentClasses() to support combining multiple source directories - Add scope validation (reject scope with artifact/dir) - Rename collectRuntimeDependencyJars() to collectDependencyJars(scope) to include test-scoped artifacts when scope is 'test' - Rename it-classloader IT to it-instrumentation with new package name - Extend verify.groovy to test the actual instrumented call path: bytecode inspection (javap) and runtime execution of redirected Thread creation via ThreadsInterceptors.newThread()
…ly-typed fields Replace optional artifact/dir/scope String fields in ServiceDescriptor and TraceAuditorDescriptor with a sealed Source interface (Artifact, Dir, Project). Source.of() factory validates mutually exclusive fields at deserialization time, eliminating the need for separate validation in BuildMojo. Use @JacksonInject to provide the project artifactId during YAML parsing so Source.Project is fully constructed at parse time. Add custom serializers to write Source variants back as flat YAML keys.
Add requireNonNull for className, ip, and source in ServiceDescriptor and TraceAuditorDescriptor. Normalize args to List.of() when null. Validate Source fields are mutually exclusive (artifact, dir, scope). Move GAV parsing into Artifact constructor for fail-fast validation, and move parseScope into Scope enum. Consolidate ServiceDescriptorSerializer and TraceAuditorDescriptorSerializer into a single DeploymentDescriptorSerializer class with a public serialize() entry point.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a 'scope' field to the deployment descriptor that controls which classes are instrumented. When scope is 'test', both target/classes and target/test-classes are combined into a single classes.jar, and test-scoped dependencies are included.