Spelling
This commit is contained in:
parent
ce851a5929
commit
819de02101
18 changed files with 51 additions and 51 deletions
|
@ -10,12 +10,12 @@ import (
|
|||
"github.com/traefik/traefik/v2/pkg/tracing"
|
||||
)
|
||||
|
||||
// Tracable embeds tracing information.
|
||||
type Tracable interface {
|
||||
// Traceable embeds tracing information.
|
||||
type Traceable interface {
|
||||
GetTracingInformation() (name string, spanKind ext.SpanKindEnum)
|
||||
}
|
||||
|
||||
// Wrap adds tracability to an alice.Constructor.
|
||||
// Wrap adds traceability to an alice.Constructor.
|
||||
func Wrap(ctx context.Context, constructor alice.Constructor) alice.Constructor {
|
||||
return func(next http.Handler) (http.Handler, error) {
|
||||
if constructor == nil {
|
||||
|
@ -26,8 +26,8 @@ func Wrap(ctx context.Context, constructor alice.Constructor) alice.Constructor
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if tracableHandler, ok := handler.(Tracable); ok {
|
||||
name, spanKind := tracableHandler.GetTracingInformation()
|
||||
if traceableHandler, ok := handler.(Traceable); ok {
|
||||
name, spanKind := traceableHandler.GetTracingInformation()
|
||||
log.FromContext(ctx).WithField(log.MiddlewareName, name).Debug("Adding tracing to middleware")
|
||||
return NewWrapper(handler, name, spanKind), nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue