opentelemetry

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package opentelemetry implements a github.com/virtual-kubelet/virtual-kubelet/trace.Tracer using openTelemetry as a backend.

Use this by setting `trace.T = Adapter{}`

For customizing trace provider used in Adapter, set trace provider by `otel.SetTracerProvider(*sdktrace.TracerProvider)`. Examples of customize are setting service name, use your own exporter (e.g. jaeger, otlp, prometheus, zipkin, and stdout) etc. Do not forget to call TracerProvider.Shutdown() when you create your TracerProvider to avoid memory leak.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct{}

Adapter implements the trace.Tracer interface for openTelemetry

func (Adapter) StartSpan

func (Adapter) StartSpan(ctx context.Context, name string) (context.Context, trace.Span)

StartSpan creates a new span from openTelemetry using the given name.

Jump to

Keyboard shortcuts

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