request

package
v1.7.1-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MessagingPublish = "publish"
	MessagingProcess = "process"
)

Variables

This section is empty.

Functions

func ClientAddr added in v1.6.0

func ClientAddr(val string) attribute.KeyValue

func ClientMetric added in v1.6.0

func ClientMetric(val string) attribute.KeyValue

func ClientNamespaceMetric added in v1.6.0

func ClientNamespaceMetric(val string) attribute.KeyValue

func ConnectionTypeMetric added in v1.6.0

func ConnectionTypeMetric(val string) attribute.KeyValue

func DBCollectionName added in v1.7.0

func DBCollectionName(val string) attribute.KeyValue

func DBOperationName added in v1.7.0

func DBOperationName(val string) attribute.KeyValue

func DBQueryText added in v1.7.0

func DBQueryText(val string) attribute.KeyValue

func DBSystem added in v1.7.0

func DBSystem(val string) attribute.KeyValue

func ErrorType added in v1.7.0

func ErrorType(val string) attribute.KeyValue

func HTTPRequestBodySize added in v1.6.0

func HTTPRequestBodySize(val int) attribute.KeyValue

func HTTPRequestMethod added in v1.6.0

func HTTPRequestMethod(val string) attribute.KeyValue

func HTTPResponseStatusCode added in v1.6.0

func HTTPResponseStatusCode(val int) attribute.KeyValue

func HTTPUrlFull added in v1.6.0

func HTTPUrlFull(val string) attribute.KeyValue

func HTTPUrlPath added in v1.6.0

func HTTPUrlPath(val string) attribute.KeyValue

func MessagingOperationType added in v1.7.0

func MessagingOperationType(val string) attribute.KeyValue

func ServerAddr added in v1.6.0

func ServerAddr(val string) attribute.KeyValue

func ServerMetric added in v1.6.0

func ServerMetric(val string) attribute.KeyValue

func ServerNamespaceMetric added in v1.6.0

func ServerNamespaceMetric(val string) attribute.KeyValue

func ServerPort added in v1.6.0

func ServerPort(val int) attribute.KeyValue

func ServiceMetric added in v1.6.0

func ServiceMetric(val string) attribute.KeyValue

func SourceMetric added in v1.6.0

func SourceMetric(val string) attribute.KeyValue

func SpanHost added in v1.6.0

func SpanHost(span *Span) string

func SpanKindMetric added in v1.6.0

func SpanKindMetric(val string) attribute.KeyValue

func SpanNameMetric added in v1.6.0

func SpanNameMetric(val string) attribute.KeyValue

func SpanOTELGetters added in v1.6.0

func SpanOTELGetters(name attr.Name) (attributes.Getter[*Span, attribute.KeyValue], bool)

SpanOTELGetters returns the attributes.Getter function that returns the OTEL attribute.KeyValue of a given attribute name. nolint:cyclop

func SpanPeer added in v1.6.0

func SpanPeer(span *Span) string

func SpanPromGetters added in v1.6.0

func SpanPromGetters(attrName attr.Name) (attributes.Getter[*Span, string], bool)

SpanPromGetters returns the attributes.Getter function that returns the Prometheus string value of a given attribute name. nolint:cyclop

func SpanStatusCode added in v1.7.0

func SpanStatusCode(span *Span) codes.Code

func StatusCodeMetric added in v1.6.0

func StatusCodeMetric(val int) attribute.KeyValue

Types

type EventType

type EventType uint8
const (
	EventTypeHTTP EventType = iota + 1
	EventTypeGRPC
	EventTypeHTTPClient
	EventTypeGRPCClient
	EventTypeSQLClient
	EventTypeRedisClient
	EventTypeKafkaClient
	EventTypeRedisServer
	EventTypeKafkaServer
)

The following consts need to coincide with some C identifiers: EVENT_HTTP_REQUEST, EVENT_GRPC_REQUEST, EVENT_HTTP_CLIENT, EVENT_GRPC_CLIENT, EVENT_SQL_CLIENT

func (EventType) MarshalText added in v1.7.0

func (t EventType) MarshalText() ([]byte, error)

func (EventType) String added in v1.7.0

func (t EventType) String() string

type IgnoreMode added in v0.3.2

type IgnoreMode uint8
const (
	IgnoreMetrics IgnoreMode = iota + 1
	IgnoreTraces
)

func (IgnoreMode) MarshalText added in v1.7.0

func (m IgnoreMode) MarshalText() ([]byte, error)

func (IgnoreMode) String added in v1.7.0

func (m IgnoreMode) String() string

type PidInfo added in v0.3.2

type PidInfo struct {
	// HostPID is the PID as seen by the host (root cgroup)
	HostPID uint32
	// UserID is the PID as seen by the user space.
	// Might differ from HostPID if the process is in a different namespace/cgroup/container/etc.
	UserPID uint32
	// Namespace for the PIDs
	Namespace uint32
}

PidInfo stores different views of the PID of the process that generated the span

type Span

type Span struct {
	Type           EventType      `json:"type"`
	IgnoreSpan     IgnoreMode     `json:"ignoreSpan"`
	Method         string         `json:"-"`
	Path           string         `json:"-"`
	Route          string         `json:"-"`
	Peer           string         `json:"peer"`
	PeerPort       int            `json:"peerPort,string"`
	Host           string         `json:"host"`
	HostPort       int            `json:"hostPort,string"`
	Status         int            `json:"-"`
	ContentLength  int64          `json:"-"`
	RequestStart   int64          `json:"-"`
	Start          int64          `json:"-"`
	End            int64          `json:"-"`
	ServiceID      svc.ID         `json:"-"` // TODO: rename to Service or ResourceAttrs
	TraceID        trace2.TraceID `json:"traceID"`
	SpanID         trace2.SpanID  `json:"spanID"`
	ParentSpanID   trace2.SpanID  `json:"parentSpanID"`
	Flags          uint8          `json:"flags,string"`
	Pid            PidInfo        `json:"-"`
	PeerName       string         `json:"peerName"`
	HostName       string         `json:"hostName"`
	OtherNamespace string         `json:"-"`
	Statement      string         `json:"-"`
}

Span contains the information being submitted by the following nodes in the graph. It enables comfortable handling of data from Go. REMINDER: any attribute here must be also added to the functions SpanOTELGetters, SpanPromGetters and getDefinitions in pkg/export/attributes/attr_defs.go

func (*Span) Inside

func (s *Span) Inside(parent *Span) bool

func (*Span) IsClientSpan added in v1.5.0

func (s *Span) IsClientSpan() bool

func (*Span) IsValid added in v1.4.2

func (s *Span) IsValid() bool

func (Span) MarshalJSON added in v1.7.0

func (s Span) MarshalJSON() ([]byte, error)

func (*Span) RequestLength added in v1.7.0

func (s *Span) RequestLength() int64

func (*Span) ServiceGraphKind added in v1.7.0

func (s *Span) ServiceGraphKind() string

ServiceGraphKind returns the Kind string representation that is compliant with service graph metrics specification

func (*Span) Timings

func (s *Span) Timings() Timings

func (*Span) TraceName added in v1.7.0

func (s *Span) TraceName() string

type SpanAttributes added in v1.7.0

type SpanAttributes map[string]string

helper attribute functions used by JSON serialization

type Timings

type Timings struct {
	RequestStart time.Time
	Start        time.Time
	End          time.Time
}

Jump to

Keyboard shortcuts

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