Skip to content

Conversation

@pepeshore
Copy link
Contributor

@pepeshore pepeshore commented Nov 4, 2025

resolved #11465

pepeshore and others added 14 commits September 18, 2025 15:27
Change-Id: Ia3b5f6b74b40763c4df7fa0185223575a2c1b068
Change-Id: I39d2ce579c60d5afa2e792f3296eef5d0b495443
…r' into feature/additonal-jdbc-url-parser

Change-Id: I5b6ee06da60fc32dc1edece63948d228c95f710b
Change-Id: Ic7a1bdab51668642fb2c3e4b775ce30f4e1a841c
…r' into feature/additonal-jdbc-url-parser

Change-Id: I6205bbedb81199c2bded7b78112389ca0b935636
Change-Id: Ie9d2a16071e77ce12f386227faaff4a4927512be
@pepeshore pepeshore requested a review from a team as a code owner November 4, 2025 13:18
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Nov 4, 2025
@pepeshore pepeshore changed the title Feat/support jfinal Feat/support jfinal and Fix #11465 Nov 4, 2025
@pepeshore pepeshore changed the title Feat/support jfinal and Fix #11465 Add support for JFinal Nov 4, 2025
@otelbot-java-instrumentation
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

@steverao steverao requested a review from Copilot November 5, 2025 02:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds OpenTelemetry Java agent instrumentation support for JFinal 3.6, a lightweight Java MVC framework. The instrumentation enables automatic tracing of HTTP requests handled by JFinal applications.

Key changes:

  • Implements instrumentation for JFinal's ActionHandler and ActionMapping components to create spans and capture HTTP routes
  • Adds comprehensive test coverage including various HTTP endpoints, error handling, and span relationship validation
  • Excludes OpenTelemetry attributes from JFinal's JsonRender to prevent serialization issues

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
settings.gradle.kts Adds the new jfinal-3.6:javaagent module to the build
TestController.java Test controller implementing various HTTP endpoints for instrumentation testing
TestConfig.java JFinal configuration class for test setup
JFinalTest.java Integration test suite validating instrumentation behavior
JFinalSingletons.java Core instrumentation logic including instrumenter setup and route extraction
JFinalInstrumentationModule.java Module definition for JFinal instrumentation
ActionMappingInstrumentation.java Instrumentation for ActionMapping.getAction() to extract HTTP routes
ActionHandlerInstrumentation.java Instrumentation for ActionHandler.handle() to create handler spans
build.gradle.kts Build configuration with dependencies and test settings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Change-Id: I61c0953cd1de4856ca7f143d0af20755399b9095
…upport-jfinal

Change-Id: I89962394646e846de25e3a68dbc76e00f472e29a
@pepeshore
Copy link
Contributor Author

@otelbot-java-instrumentation
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

- Remove unused code in ActionHandlerInstrumentation and ActionMappingInstrumentation
- Refactor JFinalSingletons to improve code organization
- Update JFinalInstrumentationModule configuration
- Enhance test coverage in JFinalTest
- Update TestController implementation
- Add JFinal support to documentation
@otelbot-java-instrumentation
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

pepeshore and others added 3 commits November 12, 2025 11:42
- Remove unused currentContext import
- Change HandleAdvice class to private for better encapsulation
- Refactor AdviceScope.start() to call Context.current() internally

Change-Id: I69e0de219e8cc80bde3bedbd641a211b45ddd6f2
- Changed minimum supported version from 3.6 to 3.2 to extend compatibility
- Renamed instrumentation module from jfinal-3.6 to jfinal-3.2
- Updated all package names from v3_6 to v3_2
- Added classLoader matcher to distinguish between JFinal 3.2 and 3.6+
- Changed HandleAdvice class visibility from private to public
- Updated documentation to reflect new version support

Change-Id: If3a9bc00c0e0ee59328971f3e9cc0152d7defe67
@otelbot-java-instrumentation
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

pepeshore and others added 2 commits November 12, 2025 14:21
- Simplified classLoader matcher to only exclude JFinal 3.6+ (TypeConverter class)
- Updated instrumenter name from jfinal-3.6 to jfinal-3.2
- Adjusted Java version constraint for tests to only apply when not testing latest deps
- Updated comment to clarify JFinal 3.6 Java 9+ compatibility issue

Change-Id: Ia4a73a9d5767e048c0dfe3897acd394cf641c6b6
@otelbot-java-instrumentation
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

pepeshore and others added 2 commits November 12, 2025 15:41
Update JFinal target from jfinal-3.6 to jfinal-3.2 to align with the renamed instrumentation module.

Change-Id: I1e8fa01c3564202330cf60b4375d720e729d00f6
pepeshore and others added 7 commits November 13, 2025 15:44
…strumentation

Add clarification that TypeConverter was moved from com.jfinal.core to
com.jfinal.core.converter after version 3.2, explaining the classloader matcher logic.

Change-Id: Id796d3e1798573a93c4fba0f30a5dd101fa73538
}

public void query() {

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

span ->
assertResponseSpan(
span, trace.getSpan(parentIndex), trace.getSpan(0), method, endpoint));
span,
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we change where the controller span is created this isn't really needed for this PR any more. I'd like to keep it as it could come handy in the future.

@laurit laurit added this to the v2.22.0 milestone Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does't compatible with JFinal framework

4 participants