telemetry

package
v0.0.0-...-a6860d5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package telemetry provides the telemetry for fleet components.

Package telemetry provides the telemetry for fleet components.

Package telemetry provides the telemetry for fleet components.

Package telemetry provides the telemetry for fleet components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvFromContext

func EnvFromContext(ctx context.Context) []string

EnvFromContext returns the environment variables for the context.

func WrapRoundTripper

func WrapRoundTripper(rt http.RoundTripper) http.RoundTripper

WrapRoundTripper wraps the round tripper with the telemetry round tripper.

Types

type Span

type Span struct {
	// contains filtered or unexported fields
}

Span represents a span.

func SpanFromContext

func SpanFromContext(ctx context.Context) (*Span, bool)

SpanFromContext returns the span from the context if available.

func StartSpanFromContext

func StartSpanFromContext(ctx context.Context, operationName string) (*Span, context.Context)

StartSpanFromContext starts a span using the context to find the parent span.

func StartSpanFromEnv

func StartSpanFromEnv(ctx context.Context, operationName string) (*Span, context.Context)

StartSpanFromEnv starts a span using the environment variables to find the parent span.

func StartSpanFromIDs

func StartSpanFromIDs(ctx context.Context, operationName, traceID, parentID string) (*Span, context.Context)

StartSpanFromIDs starts a span using the trace and parent IDs provided.

func (*Span) Finish

func (s *Span) Finish(err error)

Finish finishes the span with an error.

func (*Span) SetResourceName

func (s *Span) SetResourceName(name string)

SetResourceName sets the resource name of the span.

func (*Span) SetTag

func (s *Span) SetTag(key string, value interface{})

SetTag sets a tag on the span.

func (*Span) SetTopLevel

func (s *Span) SetTopLevel()

SetTopLevel sets the span as a top level span.

type Telemetry

type Telemetry struct {
	// contains filtered or unexported fields
}

Telemetry handles the telemetry for fleet components.

func NewTelemetry

func NewTelemetry(client *http.Client, apiKey string, site string, service string) *Telemetry

NewTelemetry creates a new telemetry instance

func (*Telemetry) Start

func (t *Telemetry) Start()

Start starts the telemetry

func (*Telemetry) Stop

func (t *Telemetry) Stop()

Stop stops the telemetry

Jump to

Keyboard shortcuts

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