tracing

package
v0.4.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 11 Imported by: 0

README

Tracing (Jaeger)

All microservice will be using OpenTracing (with Jaeger via UDP).

Environment based configuration

Configuration directly taken from https://github.com/jaegertracing/jaeger-client-go.

Property Description
JAEGER_SERVICE_NAME The service name
JAEGER_AGENT_HOST The hostname for communicating with agent via UDP
JAEGER_AGENT_PORT The port for communicating with agent via UDP
JAEGER_ENDPOINT The HTTP endpoint for sending spans directly
to a collector, i.e. http://jaeger-collector:14268/api/traces
JAEGER_USER Username to send as part of "Basic" authentication
to the collector endpoint
JAEGER_PASSWORD Password to send as part of "Basic" authentication
to the collector endpoint
JAEGER_REPORTER_LOG_SPANS Whether the reporter should also log the spans
JAEGER_REPORTER_MAX_QUEUE_SIZE The reporter's maximum queue size
JAEGER_REPORTER_FLUSH_INTERVAL The reporter's flush interval (ms)
JAEGER_SAMPLER_TYPE The sampler type
JAEGER_SAMPLER_PARAM The sampler parameter (number)
JAEGER_SAMPLER_MANAGER_HOST_PORT The HTTP endpoint when using the remote sampler,
i.e. http://jaeger-agent:5778/sampling
JAEGER_SAMPLER_MAX_OPERATIONS The maximum number of operations that the sampler
will keep track of
JAEGER_SAMPLER_REFRESH_INTERVAL How often the remotely controlled sampler will poll
jaeger-agent for the appropriate sampling strategy
JAEGER_TAGS A comma separated list of name = value tracer
level tags, which get added to all reported spans.
The value can also refer to an environment variable
using the format ${envVarName:default}, where
the :default is optional, and identifies a value to be
used if the environment variable cannot be found
JAEGER_DISABLED Whether the tracer is disabled or not. If true, the default opentracing.NoopTracer is used.
JAEGER_RPC_METRICS Whether to store RPC metrics

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Closer io.Closer

Closer can be used in shutdown hooks to ensure that the internal queue of the Reporter is drained and all buffered spans are submitted to collectors.

Tracer implementation that reports tracing to Jaeger

Functions

func Handler

func Handler(ignoredPrefixes ...string) func(http.Handler) http.Handler

Handler generates a tracing handler that decodes the current trace from the wire. The tracing handler will not start traces for the list of ignoredPrefixes.

func Request

func Request(r *http.Request) *http.Request

Request augments an outgoing request for further tracing

func TraceLogHandler added in v0.1.98

func TraceLogHandler(ignoredPrefixes ...string) func(http.Handler) http.Handler

TraceLogHandler generates a tracing handler that adds logging data to existing handler. The tracing handler will not start traces for the list of ignoredPrefixes.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL