Skip to content

Commit

Permalink
chore(opentelemetry): fix typo of "hander" -> "handler" (#3708)
Browse files Browse the repository at this point in the history
  • Loading branch information
aabmass committed Dec 28, 2023
1 parent c61668e commit 2e1da45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions opentelemetry/instrumentation/app/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (

var projectId = os.Getenv("GOOGLE_CLOUD_PROJECT")

// handerWithSpanContext adds attributes from the span context
// handlerWithSpanContext adds attributes from the span context
// [START opentelemetry_instrumentation_spancontext_logger]
func handerWithSpanContext(handler slog.Handler) *spanContextLogHandler {
func handlerWithSpanContext(handler slog.Handler) *spanContextLogHandler {
return &spanContextLogHandler{Handler: handler}
}

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry/instrumentation/app/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func setupLogging() {
// Use json as our base logging format.
jsonHandler := slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{ReplaceAttr: replacer})
// Add span context attributes when Context is passed to logging calls.
instrumentedHandler := handerWithSpanContext(jsonHandler)
instrumentedHandler := handlerWithSpanContext(jsonHandler)
// Set this handler as the global slog handler.
slog.SetDefault(slog.New(instrumentedHandler))
}
Expand Down

0 comments on commit 2e1da45

Please sign in to comment.