Skip to content

Commit

Permalink
Remove Repeated Fields Out of Base Configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
  • Loading branch information
mahadzaryab1 committed Sep 18, 2024
1 parent d5931df commit a3345f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/extension/jaegerquery/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (s *server) Start(_ context.Context, host component.Host) error {
return err
}

tm := tenancy.NewManager(&s.config.Tenancy)
tm := tenancy.NewManager(&s.config.Connection.Tenancy)

// TODO OTel-collector does not initialize the tracer currently
// https://github.com/open-telemetry/opentelemetry-collector/issues/7532
Expand Down
8 changes: 4 additions & 4 deletions cmd/query/app/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,8 @@ type QueryOptionsBase struct {
UIConfig string `valid:"optional" mapstructure:"ui_config"`
// BearerTokenPropagation activate/deactivate bearer token propagation to storage
BearerTokenPropagation bool
// AdditionalHeaders
AdditionalHeaders http.Header
// MaxClockSkewAdjust is the maximum duration by which jaeger-query will adjust a span
MaxClockSkewAdjust time.Duration
// Tenancy configures tenancy for query
Tenancy tenancy.Options
// EnableTracing determines whether traces will be emitted by jaeger-query.
EnableTracing bool
}
Expand All @@ -81,6 +77,10 @@ type QueryOptionsBase struct {
type QueryOptions struct {
QueryOptionsBase

// Tenancy configures tenancy for query
Tenancy tenancy.Options
// AdditionalHeaders
AdditionalHeaders http.Header
// HTTPHostPort is the host:port address that the query service listens in on for http requests
HTTPHostPort string
// GRPCHostPort is the host:port address that the query service listens in on for gRPC requests
Expand Down
6 changes: 2 additions & 4 deletions cmd/query/app/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,8 @@ func TestServerHTTPTenancy(t *testing.T) {
serverOptions := &QueryOptions{
HTTPHostPort: ":8080",
GRPCHostPort: ":8080",
QueryOptionsBase: QueryOptionsBase{
Tenancy: tenancy.Options{
Enabled: true,
},
Tenancy: tenancy.Options{
Enabled: true,
},
}
tenancyMgr := tenancy.NewManager(&serverOptions.Tenancy)
Expand Down

0 comments on commit a3345f0

Please sign in to comment.