-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Shorten internal component names for graph #3128
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
Conversation
@@ -233,7 +233,7 @@ private void registerErrorChannel() { | |||
|
|||
BeanComponentDefinition componentDefinition = | |||
new BeanComponentDefinition(loggingEndpointBuilder.getBeanDefinition(), | |||
IntegrationContextUtils.ERROR_LOGGER_BEAN_NAME); | |||
"errorLogger", new String[] { IntegrationContextUtils.ERROR_LOGGER_BEAN_NAME }); |
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.
Hmm... maybe too generic a name - likely to collide with a user bean.
default_errorLogger
integration_errorLogger
si_errorLogger
_si_errorLogger
...
might be better choices.
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.
Well, my point is to align with the errorChannel
indicating that this default logger is definitely tied with that global default channel.
Yes, it could collide with something in the target application, that why I'm targeting this for 5.3
, so, we have a room for some breaking changes with an appropriate Migration Guide.
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 understand your goal; but my point is that people will definitely use errorChannel
in their configuration - particularly on gateways where they just want the error logged.
However, I doubt that anyone will explicitly reference the default error logger - hence its obscure name.
I just think it might be an unnecessary burden to break an app that already has a bean errorLogger
that might not even be related to the Spring Integratin part of the application, especially when this change is really just to have a shorter name in the graph.
Yes, you asked me to provide short names for those endpoints and that is where I was stuck 😄 And yeah, I did look at this like something what is not really a bean for end-user. @kdvolder , tell us, please, how long the node name can be? Thanks |
What if we do something similar for graph like we have in JMX:
This way we don't need to change a bean name for logger, but we will shorten it for UI like we do for JMX. |
Yes, that would work for me, but that code should be improved to check |
Yes, of course, this one is covered in JMX like this:
|
27ef429
to
8d47fe4
Compare
errorLogger
name for error logger endpointThe long `IntegrationContextUtils.ERROR_LOGGER_BEAN_NAME` name is used for `errorChannel` `LoggingHandler`'s endpoint. It is too long for endpoint node in the graph meanwhile the `errorChannel` is good everywhere * Change an `IntegrationGraphServer` logic to shorten internal component names before drawing a graph * Introduce `IntegrationUtils.obtainComponentName()` for shortening an internal name if any * Use `IntegrationConfigUtils.BASE_PACKAGE` in the `IntegrationMBeanExporter` instead of its own static property * Remove `IntegrationConfigUtils.FACTORY_BEAN_OBJECT_TYPE` in favor of introduced in SF `FactoryBean.OBJECT_TYPE_ATTRIBUTE` * Rework affected test classes to JUnit 5 * Remove usage of deprecated options in the `@EnableIntegrationManagement` * Document names shortening feature for graph
8d47fe4
to
940fd56
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.
Just one
...ation-core/src/main/java/org/springframework/integration/support/utils/IntegrationUtils.java
Outdated
Show resolved
Hide resolved
* Shorten internal component names for graph The long `IntegrationContextUtils.ERROR_LOGGER_BEAN_NAME` name is used for `errorChannel` `LoggingHandler`'s endpoint. It is too long for endpoint node in the graph meanwhile the `errorChannel` is good everywhere * Change an `IntegrationGraphServer` logic to shorten internal component names before drawing a graph * Introduce `IntegrationUtils.obtainComponentName()` for shortening an internal name if any * Use `IntegrationConfigUtils.BASE_PACKAGE` in the `IntegrationMBeanExporter` instead of its own static property * Remove `IntegrationConfigUtils.FACTORY_BEAN_OBJECT_TYPE` in favor of introduced in SF `FactoryBean.OBJECT_TYPE_ATTRIBUTE` * Rework affected test classes to JUnit 5 * Remove usage of deprecated options in the `@EnableIntegrationManagement` * Document names shortening feature for graph * * Improve `obtainComponentName()` function
The long
IntegrationContextUtils.ERROR_LOGGER_BEAN_NAME
nameis used for
errorChannel
LoggingHandler
's endpoint.It is too long for endpoint node in the graph meanwhile the
errorChannel
is good everywhereIntegrationGraphServer
logic to shorten internalcomponent names before drawing a graph
IntegrationUtils.obtainComponentName()
forshortening an internal name if any
IntegrationConfigUtils.BASE_PACKAGE
in theIntegrationMBeanExporter
instead of its own static property
IntegrationConfigUtils.FACTORY_BEAN_OBJECT_TYPE
in favorof introduced in SF
FactoryBean.OBJECT_TYPE_ATTRIBUTE
@EnableIntegrationManagement
The current picture has a not good label: