Skip to content

Commit

Permalink
Make adapter use clichouse export function again
Browse files Browse the repository at this point in the history
Signed-off-by: haanhvu <haanh6594@gmail.com>
  • Loading branch information
haanhvu committed Jun 23, 2024
1 parent 45c4eb9 commit e0e69ad
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (

type Factory struct {
ss storage_v1.Factory
ch clickhouse.Factory
}

func NewFactory(ss storage_v1.Factory) spanstore.Factory {
Expand All @@ -31,7 +30,12 @@ func (*Factory) Initialize(_ context.Context) error {
}

func (f *Factory) ChExportSpans(ctx context.Context, td ptrace.Traces) error {
return f.ch.ChExportSpans(ctx, td)
switch t := f.ss.(type) {

Check failure on line 33 in cmd/jaeger/internal/extension/jaegerstorage/factoryadapter/factory.go

View workflow job for this annotation

GitHub Actions / lint

singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
case *clickhouse.Factory:
return t.ChExportSpans(ctx, td)

Check warning on line 35 in cmd/jaeger/internal/extension/jaegerstorage/factoryadapter/factory.go

View check run for this annotation

Codecov / codecov/patch

cmd/jaeger/internal/extension/jaegerstorage/factoryadapter/factory.go#L32-L35

Added lines #L32 - L35 were not covered by tests
}

return nil

Check warning on line 38 in cmd/jaeger/internal/extension/jaegerstorage/factoryadapter/factory.go

View check run for this annotation

Codecov / codecov/patch

cmd/jaeger/internal/extension/jaegerstorage/factoryadapter/factory.go#L38

Added line #L38 was not covered by tests
}

// Close implements spanstore.Factory.
Expand Down

0 comments on commit e0e69ad

Please sign in to comment.