x: github.com/ory/x/tracing Index | Files

package tracing

import "github.com/ory/x/tracing"

Package tracing provides helpers for dealing with Open Tracing and Distributed Tracing.

Index

Package Files

middleware.go traced_bcrypt.go tracer.go

Constants

const (
    // BCryptHashOpName is the operation name for bcrypt hashing operations.
    BCryptHashOpName = "bcrypt.hash"

    // BCryptCompareOpName is the operation name for bcrypt comparation operations.
    BCryptCompareOpName = "bcrypt.compare"

    // BCryptWorkFactorTagName is the operation name for bcrypt workfactor settings.
    BCryptWorkFactorTagName = "bcrypt.workfactor"
)

func HelpMessage Uses

func HelpMessage(defaultName string) string

HelpMessage returns a help message for CLIs using tracing.

type JaegerConfig Uses

type JaegerConfig struct {
    LocalAgentHostPort string
    SamplerType        string
    SamplerValue       float64
    SamplerServerURL   string
    Propagation        string
}

JaegerConfig encapsulates jaeger's configuration.

type TracedBCrypt Uses

type TracedBCrypt struct {
    WorkFactor int
}

TracedBCrypt implements the Hasher interface.

func (*TracedBCrypt) Compare Uses

func (b *TracedBCrypt) Compare(ctx context.Context, hash, data []byte) error

Compare returns nil if hash and data match.

func (*TracedBCrypt) Hash Uses

func (b *TracedBCrypt) Hash(ctx context.Context, data []byte) ([]byte, error)

Hash returns the hashed string or an error.

type Tracer Uses

type Tracer struct {
    ServiceName  string
    Provider     string
    Logger       *logrusx.Logger
    JaegerConfig *JaegerConfig
    ZipkinConfig *ZipkinConfig
    // contains filtered or unexported fields
}

Tracer encapsulates tracing abilities.

func (*Tracer) Close Uses

func (t *Tracer) Close()

Close closes the tracer.

func (*Tracer) IsLoaded Uses

func (t *Tracer) IsLoaded() bool

IsLoaded returns true if the tracer has been loaded.

func (*Tracer) ServeHTTP Uses

func (t *Tracer) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

func (*Tracer) Setup Uses

func (t *Tracer) Setup() error

Setup sets up the tracer. Currently supports jaeger.

type ZipkinConfig Uses

type ZipkinConfig struct {
    ServerURL string
}

ZipkinConfig encapsulates zipkin's configuration.

Package tracing imports 16 packages (graph) and is imported by 18 packages. Updated 2020-06-24. Refresh now. Tools for package owners.