mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
9b6dad18cb
* feat: provide metrics endpoint * config * enable otel metrics by default Co-authored-by: Florian Forster <florian@caos.ch>
21 lines
392 B
Go
21 lines
392 B
Go
package otel
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/telemetry/metrics"
|
|
)
|
|
|
|
type Config struct {
|
|
MeterName string
|
|
}
|
|
|
|
func NewTracerFromConfig(rawConfig map[string]interface{}) (err error) {
|
|
c := new(Config)
|
|
c.MeterName, _ = rawConfig["metername"].(string)
|
|
return c.NewMetrics()
|
|
}
|
|
|
|
func (c *Config) NewMetrics() (err error) {
|
|
metrics.M, err = NewMetrics(c.MeterName)
|
|
return err
|
|
}
|