alibaba / sentinel-golang

Sentinel Go enables reliability and resiliency for Go microservices
https://sentinelguard.io/
Apache License 2.0
2.78k stars 439 forks source link

[BUG] Always an EmptyExporter #580

Open binbin0325 opened 2 months ago

binbin0325 commented 2 months ago

Issue Description

Read the httpaddr in the exporter init function is always a null character, because the global configuration has not been set at the time of the init function execution https://github.com/alibaba/sentinel-golang/blob/master/exporter/metric/exporter.go#L36

Type: bug report

Describe what happened

empty exporter it doesn't make sense, judgment has been made in the initCoreComponents func

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?