mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
feat: new tracing type none (#422)
This commit is contained in:
parent
8efa697af2
commit
5658f33918
@ -61,4 +61,7 @@ export ZITADEL_SHORT_CACHE_SHARED_MAXAGE=15m
|
||||
export ZITADEL_CONSOLE_ENV_DIR=../../console/src/assets/
|
||||
|
||||
#Org
|
||||
export ZITADEL_DEFAULT_DOMAIN=zitadel.ch
|
||||
export ZITADEL_DEFAULT_DOMAIN=zitadel.ch
|
||||
|
||||
#Tracing
|
||||
export TRACING_TYPE=google
|
@ -4,7 +4,7 @@ Log:
|
||||
Format: text
|
||||
|
||||
Tracing:
|
||||
Type: google
|
||||
Type: $TRACING_TYPE
|
||||
Config:
|
||||
ProjectID: $ZITADEL_TRACING_PROJECT_ID
|
||||
MetricPrefix: ZITADEL-V1
|
||||
|
@ -17,6 +17,8 @@ type TracingConfig struct {
|
||||
var tracer = map[string]func() tracing.Config{
|
||||
"google": func() tracing.Config { return &tracing_g.Config{} },
|
||||
"log": func() tracing.Config { return &tracing_log.Config{} },
|
||||
"none": func() tracing.Config { return &NoTracing{} },
|
||||
"": func() tracing.Config { return &NoTracing{} },
|
||||
}
|
||||
|
||||
func (c *TracingConfig) UnmarshalJSON(data []byte) error {
|
||||
@ -57,3 +59,9 @@ func newTracingConfig(tracerType string, configData []byte) (tracing.Config, err
|
||||
|
||||
return tracingConfig, nil
|
||||
}
|
||||
|
||||
type NoTracing struct{}
|
||||
|
||||
func (_ *NoTracing) NewTracer() error {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user