Skip to content

Commit

Permalink
push prom metric registry to co nfig
Browse files Browse the repository at this point in the history
  • Loading branch information
v9n committed Jan 7, 2025
1 parent d6117ea commit 75ea2fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ type Config struct {
Environment sdklogging.LogLevel

Macros map[string]string

MetricsReg *prometheus.Registry
}

type SmartWalletConfig struct {
Expand Down Expand Up @@ -121,7 +123,6 @@ func NewConfig(configFilePath string) (*Config, error) {
return nil, err
}

// TODO: where do we feed this?
reg := prometheus.NewRegistry()
rpcCallsCollector := rpccalls.NewCollector("exampleAvs", reg)

Expand Down Expand Up @@ -203,6 +204,7 @@ func NewConfig(configFilePath string) (*Config, error) {

SocketPath: configRaw.SocketPath,
Macros: configRaw.Macros,
MetricsReg: reg,
}

if config.SocketPath == "" {
Expand Down

0 comments on commit 75ea2fb

Please sign in to comment.