Ideally we'd like naming rules for EndpointId
to be a bit tighter and restrict -
and .
chars. We couldn't do this in 2.0.x because of some Spring Cloud endpoints.
Comment From: Crow-EH
Hi @philwebb, Here is my contribution. Please tell me if something is missing.
Comment From: philwebb
@Crow-EH Thanks for your contribution, I've added a note to the PR. Unfortunately this issue description wasn't clear enough. For 2.1 we'd still like to support -
and .
but just log a warning.
Comment From: philwebb
@spencergibb This might affect Spring Cloud. Will it be possible to migrate those endpoints if we make this change?
Comment From: Crow-EH
No problem, thank you for your time @philwebb
Comment From: spencergibb
@philwebb it will affect spring cloud. If we restrict the endpoint id can we add an attribute to the annotations that is similar to management.endpoints.web.path-mapping
. Users will always want to hit /hystrix.stream.
Comment From: philwebb
@spencergibb Yeah, we were aware of that one so we introduced #14841 (take a look at this test. Hopefully you can rename the endpoint to hystrixStream
and register a PathMapper
bean to supply the default path. The user can still replace the path with properties if they want to.
Comment From: philwebb
@spencergibb If it's too late in the day for this change we can defer it until 2.2
Comment From: spencergibb
PathMapper
looks just fine. I think the team would appreciate deferring until 2.2 while logging warnings in 2.1.
Comment From: philwebb
Sorry, I meant should we defer the warning logs as well since we're so close to GA?
Comment From: spencergibb
I don't mind the warnings.
Comment From: puce77
What's the reason for restricting the "-" character? It's pretty common in URLs and good for separating words, IMHO.
Comment From: wilkinsona
Every endpoint has a number of configuration properties associated with it and configuration properties should avoid using -
characters in the prefix, reserving their use for the property's name. Prohibiting the use of -
in the name of the endpoint ID prevents problems with the configuration properties for the endpoint.
Comment From: puce77
@wilkinsona : Thanks for the explanation!