Skip to content

Commit

Permalink
[bug-kafka-consumer] set the passedin rackid in consumer config
Browse files Browse the repository at this point in the history
Signed-off-by: Saketh kappala <[email protected]>
  • Loading branch information
sappusaketh committed Apr 19, 2024
1 parent 5434892 commit 0daf519
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/ingester/app/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func CreateConsumer(logger *zap.Logger, metricsFactory metrics.Factory, spanWrit
ClientID: options.ClientID,
ProtocolVersion: options.ProtocolVersion,
AuthenticationConfig: options.AuthenticationConfig,
RackID: options.RackID,
FetchMaxMessageBytes: options.FetchMaxMessageBytes,
}
saramaConsumer, err := consumerConfig.NewConsumer(logger)
Expand Down
3 changes: 1 addition & 2 deletions pkg/config/tlscfg/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,10 @@ func (p *Options) Config(logger *zap.Logger) (*tls.Config, error) {
}
}

// #nosec G402
tlsCfg := &tls.Config{
RootCAs: certPool,
ServerName: p.ServerName,
InsecureSkipVerify: p.SkipHostVerify,
InsecureSkipVerify: p.SkipHostVerify, /* #nosec G402*/
CipherSuites: cipherSuiteIds,
MinVersion: minVersionId,
MaxVersion: maxVersionId,
Expand Down
2 changes: 2 additions & 0 deletions storage/spanstore/downsampling_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func TestDownSamplingWriter_hashBytes(t *testing.T) {
}
c := NewDownsamplingWriter(&noopWriteSpanStore{}, downsamplingOptions)
h := c.sampler.hasherPool.Get().(*hasher)
//nolint:testifylint
assert.Equal(t, h.hashBytes(), h.hashBytes())
c.sampler.hasherPool.Put(h)
trace := model.TraceID{
Expand All @@ -81,6 +82,7 @@ func TestDownSamplingWriter_hashBytes(t *testing.T) {
}
_, _ = span.TraceID.MarshalTo(h.buffer)
// Same traceID should always be hashed to same uint64 in DownSamplingWriter.
//nolint:testifylint
assert.Equal(t, h.hashBytes(), h.hashBytes())
}

Expand Down

0 comments on commit 0daf519

Please sign in to comment.