Skip to content

Remove Legacy Metrics - #3357

Merged
artembilan merged 2 commits into
spring-projects:masterfrom
garyrussell:legacyMetrics2
Aug 7, 2020
Merged

artembilan merged 2 commits into
spring-projects:masterfrom
garyrussell:legacyMetrics2

Conversation

@garyrussell

Copy link
Copy Markdown
Contributor
  • Simplify MBeans - instead of wrapping to expose lifecycle methods,
    implement ManageableLifecycle. Register an additional MBean for
    polled endpoints to control the lifecycle.

@artembilan artembilan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not too much to say since PR is huge.
Probably I'll merge it as is after your clarifications to my questions.
Mostly I trust you.

Thanks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm. Looks like we don't need a @ManagedResource.
What do I miss?

Thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We export all components; they don't need @ManagedResource; they do, however, need @IntegrationManagedResource to prevent the normal MBE from exporting.

That said, pause/resume are not showing up - investigating...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure this one has to be manageable - it is just an inner one

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably we need to raise an issue to not forget this TODO...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if we really should apply our Integration management logic to not integration components.
This one sounds more like regular Spring bean, so what is the point to manage it.
I might be not reached JMX yet, but just in case I won't forget in this number of file to review...
Thanks for understanding

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we don't need this if. The logic below covers everything we needed.
And having a MessageHandler as a proxy won't give us a positive match with this if anyway.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah - I went through a lot of iterations with this; I thought I had cleaned all these up. Good catch.

- Simplify MBeans - instead of wrapping to expose lifecycle methods,
  implement `ManageableLifecycle`. Register an additional MBean for
  polled endpoints to control the lifecycle.
- Move `QueueChannel` `@ManagedAttribute`s to `QueueChannelOperations`
- Make all `AbstractEndpoints` `IntegrationManagedResource`s and remove `ManagedEndpoint`
  to allow exposure of any `@Managed*` methods (including those on `Pausable`)
- Revert to `Lifecycle` for classes that are not related to endpoints
- Remove legacy metrics from docs
@garyrussell

Copy link
Copy Markdown
Contributor Author

Rebased and re-pushed with polishing.

@artembilan
artembilan merged commit 1beb854 into spring-projects:master Aug 7, 2020
@garyrussell
garyrussell deleted the legacyMetrics2 branch August 7, 2020 17:39
@artembilan artembilan added this to the 5.4 M2 milestone Aug 7, 2020
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.

2 participants