mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
fix: typo
This commit is contained in:
parent
a5bdcaf541
commit
e2096b6b1d
@ -8,10 +8,10 @@ import (
|
||||
|
||||
type labelerContextKeyType int
|
||||
|
||||
const lablelerContextKey labelerContextKeyType = 0
|
||||
const labelerContextKey labelerContextKeyType = 0
|
||||
|
||||
func injectLabeler(ctx context.Context, l *otelhttp.Labeler) context.Context {
|
||||
return context.WithValue(ctx, lablelerContextKey, l)
|
||||
return context.WithValue(ctx, labelerContextKey, l)
|
||||
}
|
||||
|
||||
// LabelerFromContext retrieves a Labeler instance from the provided context if
|
||||
@ -19,7 +19,7 @@ func injectLabeler(ctx context.Context, l *otelhttp.Labeler) context.Context {
|
||||
// Labeler is returned and the second return value is false. In this case it is
|
||||
// safe to use the Labeler but any attributes added to it will not be used.
|
||||
func LabelerFromContext(ctx context.Context) (context.Context, *otelhttp.Labeler) {
|
||||
l, ok := ctx.Value(lablelerContextKey).(*otelhttp.Labeler)
|
||||
l, ok := ctx.Value(labelerContextKey).(*otelhttp.Labeler)
|
||||
if !ok {
|
||||
l = &otelhttp.Labeler{}
|
||||
ctx = injectLabeler(ctx, l)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user