jaeger

package module
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 145

Documentation

Overview

Package jaeger implements the Jaeger propagator specification as defined at https://www.jaegertracing.io/docs/1.18/client-libraries/#propagation-format

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func SemVersion deprecated added in v0.24.0

func SemVersion() string

SemVersion is the semantic version to be supplied to tracer/meter creation.

Deprecated: Use Version instead.

func Version added in v0.24.0

func Version() string

Version is the current release version of the Jaeger propagator.

Types

type Jaeger

type Jaeger struct{}

Jaeger propagator serializes SpanContext to/from Jaeger Headers

Jaeger format:

uber-trace-id: {trace-id}:{span-id}:{parent-span-id}:{flags}.

Example
package main

import (
	"go.opentelemetry.io/contrib/propagators/jaeger"
	"go.opentelemetry.io/otel"
)

func main() {
	p := jaeger.Jaeger{}
	// register jaeger propagator
	otel.SetTextMapPropagator(p)
}
Output:

func (Jaeger) Extract

func (jaeger Jaeger) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context

Extract extracts a context from the carrier if it contains Jaeger headers.

func (Jaeger) Fields

func (jaeger Jaeger) Fields() []string

Fields returns the Jaeger header key whose value is set with Inject.

func (Jaeger) Inject

func (jaeger Jaeger) Inject(ctx context.Context, carrier propagation.TextMapCarrier)

Inject injects a context to the carrier following jaeger format. The parent span ID is set to an dummy parent span id as the most implementations do.

Jump to

Keyboard shortcuts

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