Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ObservationApplier abstraction #4850

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ilya40umov
Copy link

This PR is trying to address the problem described in gh-4827.

  • Introduce ObservationApplier and ObservationApplierRegistry abstractions
  • Create an implementation of ObservationApplier for CompletionStage
  • Create an implementation of ObservationApplier that can be used on suspending methods

Cons:

  • ObservationToSuspendingMethodApplier will only work correctly when Spring Framework is in use (due the implementation taking advantage of how Spring AOP is handling calls to suspending functions)
    • Due to this, I'm not quite sure how to write tests for this class at the moment
  • ObservationToSuspendingMethodApplier needs to refer to Mono, and so io.projectreactor:reactor-core is needed on the classpath
  • ObservationToSuspendingMethodApplier is not registered automatically (could be done at the service startup by Spring Boot etc.)

Not done yet:

  • Javadocs
  • Tests

Open Questions:

  • Given the Cons mentioned above, should ObservationToSuspendingMethodApplier potentially be moved to Spring Framework or Spring Boot instead?

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.

1 participant