alibaba/sentinel-golang

[BUG] App name in metric is unknown_ go_ service

開放

#453 建立於 2022年1月12日

 (1 則留言) (0 個反應) (0 位負責人)Go (453 個分叉)github user discovery
good first issue

倉庫指標

星標
 (2,957 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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

貢獻者指南