Skip to content

Health (and Metrics and other) endpoints could have an explicit registry API to support child contexts #5312

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

Closed
dsyer opened this issue Mar 2, 2016 · 3 comments
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@dsyer
Copy link
Member

dsyer commented Mar 2, 2016

It's not a common use case, but since the actuator endpoints all live naturally in the "main" context, when an application adds a child context it is sort of orphaned, and none of its beans get included in metrics or health checks. Example: child context adds a new DataSource, but it won't show up in the health indicators for the app.

The only way I see to provide this is to have a registry API that is a bean in the main context, and then the child context can autowire it and register things (e.g. a health indicator, public metrics, info set).

Spring Cloud Stream already has a version of a solution, but we need something that others can use.

See also #5196

@dsyer dsyer added the type: enhancement A general enhancement label Mar 2, 2016
@dsyer dsyer added this to the 1.4.0.M3 milestone Mar 2, 2016
@philwebb philwebb modified the milestones: 1.4.0.RC1, 1.4.0.M3 May 17, 2016
@philwebb philwebb added for: team-attention An issue we'd like other members of the team to review and removed for: team-attention An issue we'd like other members of the team to review labels May 25, 2016
@philwebb philwebb removed this from the 1.4.0.RC1 milestone May 25, 2016
@wilkinsona
Copy link
Member

The mappings endpoint is a special case of this. When the management port is set, the actuator's own mappings disappear from the endpoint as they're in the child management context while the endpoint itself remains in the parent.

@wilkinsona
Copy link
Member

wilkinsona commented Nov 11, 2017

On further inspection, the mappings endpoint isn't really a special case here. For example, the beans endpoint also has a similar problem. When the management port is set, the beans in the management context (either new ones or those that move from the main application context into the child) aren't included in the output. Moving the endpoint down into the management context doesn't help as then the endpoint is no longer discovered.

@philwebb
Copy link
Member

philwebb commented Sep 7, 2018

Adding context hierarchy support will add a lot of complexity and I'm not sure we currently have the cycles to do it justice. I'd prefer to keep the actuator code simple for now so I'm going to close this one. We can re-open it in the future if we think hierarchy support is really necessary.

@philwebb philwebb closed this as completed Sep 7, 2018
@philwebb philwebb added status: declined A suggestion or change that we don't feel we should currently apply and removed type: enhancement A general enhancement labels Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

3 participants