Skip to content

Commit

Permalink
[chore] update docstrings for consistency (#11529)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten authored Oct 23, 2024
1 parent 7a52d7c commit 90243f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions service/telemetry/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"go.uber.org/zap/zapcore"
)

// newLogger creates a Logger and a LoggerProvider from Config.
func newLogger(ctx context.Context, set Settings, cfg Config) (*zap.Logger, log.LoggerProvider, error) {
// Copied from NewProductionConfig.
zapCfg := &zap.Config{
Expand Down
1 change: 1 addition & 0 deletions service/telemetry/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type meterProviderSettings struct {
asyncErrorChannel chan error
}

// newMeterProvider creates a new MeterProvider from Config.
func newMeterProvider(set meterProviderSettings, disableHighCardinality bool) (metric.MeterProvider, error) {
if set.cfg.Level == configtelemetry.LevelNone || len(set.cfg.Readers) == 0 {
return noop.NewMeterProvider(), nil
Expand Down
2 changes: 1 addition & 1 deletion service/telemetry/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (n *noopNoContextTracerProvider) Tracer(_ string, _ ...trace.TracerOption)
return &noopNoContextTracer{}
}

// New creates a new Telemetry from Config.
// newTracerProvider creates a new TracerProvider from Config.
func newTracerProvider(ctx context.Context, set Settings, cfg Config) (trace.TracerProvider, error) {
if noopTracerProvider.IsEnabled() || cfg.Traces.Level == configtelemetry.LevelNone {
return &noopNoContextTracerProvider{}, nil
Expand Down

0 comments on commit 90243f3

Please sign in to comment.