Skip to content

Commit

Permalink
fix: instrumentation library name as go mod name (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
blumamir authored Oct 11, 2023
1 parent b34533d commit f795916
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions otellogger.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import (
)

const (
otelSdkDisabled = "OTEL_SDK_DISABLED"
otelSdkDisabled = "OTEL_SDK_DISABLED"
instrumentationLibraryName = "github.com/keyval-dev/opentelemetry-zap-bridge"
)

type OtelZapCore struct {
Expand All @@ -35,8 +36,8 @@ func NewOtelZapCore() zapcore.Core {
loggerProvider := autosdk.NewLoggerProvider(ctx)
// TODO: what scope name should we use?
// should we allow this to be conbfigurable?
// how do we record correct scope name for
logger := loggerProvider.Logger("otel/zap")
// how do we record correct scope name with zap?
logger := loggerProvider.Logger(instrumentationLibraryName)

return &OtelZapCore{
logger: logger,
Expand Down

0 comments on commit f795916

Please sign in to comment.