adapter

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Adapted from https://github.com/open-telemetry/opentelemetry-go/blob/e9aaa04b8f88b0f8158bd27f72e57d33878f5bdd/trace/trace.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDGenerator

type IDGenerator interface {
	NewTraceID() TraceID
	NewSpanID() SpanID
}

IDGenerator allows custom generators for TraceID and SpanID.

type MetricsAdapter

type MetricsAdapter interface {
	ID() string
	Script() string
	CollectIntervalSec() int64
	Adapt(rh *ResourceHelper, r *types.Record) ([]*metricpb.ResourceMetrics, error)
}

func HTTPMetrics

func HTTPMetrics(clusterName, pixieClusterID string, collectIntervalSec int64) MetricsAdapter

func JVM

func JVM(clusterName, pixieClusterID string, collectIntervalSec int64) MetricsAdapter

type ResourceHelper added in v1.3.0

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

func NewResourceHelper added in v1.3.0

func NewResourceHelper(excludePods, excludeNamespaces string) (*ResourceHelper, error)

type SpanID

type SpanID [8]byte

SpanID is a unique identity of a adapter in a trace.

func SpanIDFromHex

func SpanIDFromHex(h string) (SpanID, error)

SpanIDFromHex returns a SpanID from a hex string if it is compliant with the w3c trace-context specification. See more at https://www.w3.org/TR/trace-context/#parent-id

func (SpanID) IsValid

func (s SpanID) IsValid() bool

IsValid checks whether the SpanID is valid. A valid SpanID does not consist of zeros only.

type SpansAdapter

type SpansAdapter interface {
	ID() string
	Script() string
	CollectIntervalSec() int64
	Adapt(rh *ResourceHelper, r *types.Record) ([]*tracepb.ResourceSpans, error)
}

func HTTPSpans

func HTTPSpans(clusterName, pixieClusterID string, collectIntervalSec, spanLimit int64) SpansAdapter

func MySQL

func MySQL(clusterName, pixieClusterID string, collectIntervalSec, spanLimit int64) SpansAdapter

func PgSQL

func PgSQL(clusterName, pixieClusterID string, collectIntervalSec, spanLimit int64) SpansAdapter

type TraceID

type TraceID [16]byte

TraceID is a unique identity of a trace. nolint:golint

func TraceIDFromHex

func TraceIDFromHex(h string) (TraceID, error)

TraceIDFromHex returns a TraceID from a hex string if it is compliant with the W3C trace-context specification. See more at https://www.w3.org/TR/trace-context/#trace-id nolint:golint

func (TraceID) IsValid

func (t TraceID) IsValid() bool

IsValid checks whether the trace TraceID is valid. A valid trace ID does not consist of zeros only.

Jump to

Keyboard shortcuts

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