Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten committed Oct 3, 2024
1 parent 74ab1ac commit 766208b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions service/telemetry/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ func newLogger(ctx context.Context, cfg LogsConfig, options []zap.Option) (*zap.

logger, err := zapCfg.Build(options...)

if err != nil {
return nil, err
}

if len(cfg.Processors) > 0 {
sdk, err := config.NewSDK(
config.WithContext(ctx),
Expand All @@ -53,9 +57,6 @@ func newLogger(ctx context.Context, cfg LogsConfig, options []zap.Option) (*zap.
}))

Check warning on line 57 in service/telemetry/logger.go

View check run for this annotation

Codecov / codecov/patch

service/telemetry/logger.go#L55-L57

Added lines #L55 - L57 were not covered by tests
}

if err != nil {
return nil, err
}
if cfg.Sampling != nil && cfg.Sampling.Enabled {
logger = newSampledLogger(logger, cfg.Sampling)
}
Expand Down

0 comments on commit 766208b

Please sign in to comment.