Skip to content

Commit

Permalink
fix: set otel insecure flag for all telemetry instantiations (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
abelanger5 authored Oct 30, 2024
1 parent 982e4a2 commit a9936ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/hatchet-engine/engine/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ func runV0Config(ctx context.Context, sc *server.ServerConfig) ([]Teardown, erro
ServiceName: sc.OpenTelemetry.ServiceName,
CollectorURL: sc.OpenTelemetry.CollectorURL,
TraceIdRatio: sc.OpenTelemetry.TraceIdRatio,
Insecure: sc.OpenTelemetry.Insecure,
})
if err != nil {
return nil, fmt.Errorf("could not initialize tracer: %w", err)
Expand Down Expand Up @@ -491,6 +492,7 @@ func runV1Config(ctx context.Context, sc *server.ServerConfig) ([]Teardown, erro
ServiceName: sc.OpenTelemetry.ServiceName,
CollectorURL: sc.OpenTelemetry.CollectorURL,
TraceIdRatio: sc.OpenTelemetry.TraceIdRatio,
Insecure: sc.OpenTelemetry.Insecure,
})
if err != nil {
return nil, fmt.Errorf("could not initialize tracer: %w", err)
Expand Down
1 change: 1 addition & 0 deletions pkg/config/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ func BindAllEnv(v *viper.Viper) {
_ = v.BindEnv("otel.serviceName", "SERVER_OTEL_SERVICE_NAME")
_ = v.BindEnv("otel.collectorURL", "SERVER_OTEL_COLLECTOR_URL")
_ = v.BindEnv("otel.traceIdRatio", "SERVER_OTEL_TRACE_ID_RATIO")
_ = v.BindEnv("otel.insecure", "SERVER_OTEL_INSECURE")

// tenant alerting options
_ = v.BindEnv("tenantAlerting.slack.enabled", "SERVER_TENANT_ALERTING_SLACK_ENABLED")
Expand Down
1 change: 1 addition & 0 deletions pkg/config/shared/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ type OpenTelemetryConfigFile struct {
CollectorURL string `mapstructure:"collectorURL" json:"collectorURL,omitempty"`
ServiceName string `mapstructure:"serviceName" json:"serviceName,omitempty" default:"server"`
TraceIdRatio string `mapstructure:"traceIdRatio" json:"traceIdRatio,omitempty" default:"1"`
Insecure bool `mapstructure:"insecure" json:"insecure,omitempty" default:"false"`
}

0 comments on commit a9936ef

Please sign in to comment.