添加兼容spring.application.name方式定制dashboard中展示名称的配置功能
- Dominant language
- Java
- Stars
- 23.1k
- Forks
- 8.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Issue Description
Type: *feature request*
### Describe what happened (or what feature you want)
默认的spring.application.name配置项,会默认作为拉取Nacos中配置中心参数,以及注册为Nacos微服务的服务名称用。后续加入Sentinel平台后,Sentinel平台也会把默认服务名称显示为spring.application.name配置参数。但是Sentinel平台会同时接入多个服务,预上线或者生产环境,所以如果默认使用spring.application.name配置参数的话,同一个服务的pre和prod环境的服务,就会在dashboard中合并展示为一个服务。
如果pre和prod环境使用不同的spring.application.name配置参数,Nacos的服务注册发现以及配置中心功能又会受影响。
### Describe what you expected to happen
dashboard服务名称默认获取spring.application.name配置项,提供一个自定义服务名称的参数,如果配置了,读取该自定义参数。
Contributor guide
Research direction
Start by tracing how the Sentinel dashboard currently obtains and displays the service name, using spring.application.name as the existing behavior to follow. Identify the configuration entry point and dashboard display path, then verify that an optional custom name changes only the dashboard label while Nacos registration and configuration lookup remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100