sentinel-golang icon indicating copy to clipboard operation
sentinel-golang copied to clipboard

[BUG] App name in metric is unknown_ go_ service

Open kklinan opened this issue 2 years ago • 1 comments

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

kklinan avatar Jan 12 '22 11:01 kklinan

Would you like to contribute a PR to fix it?

sczyh30 avatar Jan 19 '22 01:01 sczyh30