-
Notifications
You must be signed in to change notification settings - Fork 167
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
feat: Micrometer Observation instrumentation #17494
base: main
Are you sure you want to change the base?
Conversation
|
b1bbe0c
to
d80ecec
Compare
@marcingrzejszczak thank you a lot for your contribution, we appreciate it and will start reviewing it soon 👍 |
* @author Marcin Grzejszczak | ||
* @since 24.2 | ||
*/ | ||
public interface VaadinFilter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it would be worth to focus first on this interface and its integration into flow, allowing this to be already added e.g. in the upcoming release - especially since the full integration could take a little bit longer (see Jakarta / Snapshot usage). If I remember correctly, I've seen multiple dicussions quite recently where people needed hooks like this. Shamelessly pinging @mstahv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! I didn't know if you want sth like that. Let me split the two then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait for Mikhail's response before you do anything. I'm just an external contributor like you ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I split that #17502, I still think the change makes sense to be split into 2 PRs. Thanks for the great tip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@knoobie Already subscribed 😎
Quick comment on the VaadinFilter (although now in separate PR): maybe it could also cover UI.access calls coming from separate threads 🤔 And then requests & al are optional or within some context parameter 🤷♂️
VaadinFilter simulates an around aspect around processing of a request related to vaadingh-17436
- adds a VaadinFilter mechanism to mimic an around-aspect - adds a Micrometer Observation implementation - configures VaadinServlet to automatically update the VaadinService with filters - configures Spring to automatically update the VaadinServlet with filters
d80ecec
to
b0ce659
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd propose to extract the Micrometer Observation implementation of request interceptors into a separate maven module flow-observation
or flow-micrometer
.
Then the Micrometer dependencies can be normal, i.e. non-optional.
Then we need to add it into flow-bom
and into vaadin-bom
on the platform side.
Finally, it can be pluggable, so if a project defines
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-micrometer</artifactId>
</dependency>
then the Micrometer's VaadinRequestInterceptor
s add themselves via Service Init Listener. Otherwise, if no dependency is set, Micrometer observation isn't included.
We did something similar with flow-webpush
module recently, so you can use it as an example.
Needs a rebase to main branch. |
@mshabarov I wonder if we shouldn't first add instrumentation of the commands. To this, we need to implement this micrometer-metrics/micrometer#3989 and that's not merged yet |
I would suggest to add first the instrumentation for things that already merge and for what we already have a PR. So could we merge the instrumentation proposed in this PR? |
I would love to but this https://github.com/vaadin/flow/pull/17494/files#diff-4abe9f264d9d9616e9178b98b70fdfbb13aeea2d49ef4c0e6c30f04882ab55d3R147 is not actually pushed anywhere. I made it work locally because I installed this module in my local .m2. Before this PR gets merged, this PR micrometer-metrics/micrometer#3989 must get merged first 😬 |
Just wondering is this targeted for Micrometer 1.12 / Spring Boot 3.2 in November or is it pending a release version, meaning it could at first land in 1.1x / Spring Boot 3.3 in Mai 2024? ;) |
I want the PR to merged asap so that it's happening for 1.12 of Micrometer. |
I see, thanks for explanations 👍 |
Do we want to proceed with the command instrumentation in the meantime? Also do you have a chat of some sort (e.g. Slack) where it will be easier to communicate rather than Github issues? :) |
Yes, let's do. I remember you had a branch with prototype. Could you share it with a new pull request and I'll review?
Discord is it :) Here is a link https://discord.com/invite/vaadin. You can DM me directly there. |
@mshabarov there you go #17738 |
Description
What's missing:
Fixes #17436
Type of change
Checklist
Additional for
Feature
type of change