sentinel-golang
sentinel-golang copied to clipboard
[BUG] App name in metric is unknown_ go_ service
Issue Description
Type: bug report
Describe what happened
https://github.com/alibaba/sentinel-golang/blob/683c229b23a96c4ad07dc795da3730db8fd9d93c/exporter/metric/exporter.go#L35-L45
Since the above code (code 1) uses the init
function and is executed before the following code (code 2), the app
variable in code 1 is an error.
https://github.com/alibaba/sentinel-golang/blob/683c229b23a96c4ad07dc795da3730db8fd9d93c/api/init.go#L54-L74
Would you like to contribute a PR to fix it?