Documentation
¶
Index ¶
- Constants
- func ClientAddr(val string) attribute.KeyValue
- func ClientMetric(val string) attribute.KeyValue
- func ClientNamespaceMetric(val string) attribute.KeyValue
- func ConnectionTypeMetric(val string) attribute.KeyValue
- func CudaKernel(val string) attribute.KeyValue
- func DBCollectionName(val string) attribute.KeyValue
- func DBOperationName(val string) attribute.KeyValue
- func DBQueryText(val string) attribute.KeyValue
- func DBSystemName(val string) attribute.KeyValue
- func ErrorType(val string) attribute.KeyValue
- func GrpcSpanStatusCode(span *Span) codes.Code
- func HTTPClientHost(span *Span) string
- func HTTPRequestBodySize(val int) attribute.KeyValue
- func HTTPRequestMethod(val string) attribute.KeyValue
- func HTTPResponseStatusCode(val int) attribute.KeyValue
- func HTTPScheme(span *Span) string
- func HTTPSpanStatusCode(span *Span) codes.Code
- func HTTPUrlFull(val string) attribute.KeyValue
- func HTTPUrlPath(val string) attribute.KeyValue
- func HostAsServer(span *Span) string
- func MessagingOperationType(val string) attribute.KeyValue
- func PeerAsClient(span *Span) string
- func ServerAddr(val string) attribute.KeyValue
- func ServerMetric(val string) attribute.KeyValue
- func ServerNamespaceMetric(val string) attribute.KeyValue
- func ServerPort(val int) attribute.KeyValue
- func ServiceMetric(val string) attribute.KeyValue
- func SourceMetric(val string) attribute.KeyValue
- func SpanHost(span *Span) string
- func SpanKindMetric(val string) attribute.KeyValue
- func SpanNameMetric(val string) attribute.KeyValue
- func SpanOTELGetters(name attr.Name) (attributes.Getter[*Span, attribute.KeyValue], bool)
- func SpanPeer(span *Span) string
- func SpanPromGetters(attrName attr.Name) (attributes.Getter[*Span, string], bool)
- func SpanStatusCode(span *Span) codes.Code
- func StatusCodeMetric(val int) attribute.KeyValue
- func URLFull(scheme, host, path string) string
- type EventType
- type PidInfo
- type SQLKind
- type Span
- func (s *Span) DBSystemName() attribute.KeyValue
- func (s *Span) HasOriginalHost() bool
- func (s *Span) IgnoreMetrics() bool
- func (s *Span) IgnoreTraces() bool
- func (s *Span) Inside(parent *Span) bool
- func (s *Span) InternalSignal() bool
- func (s *Span) IsClientSpan() bool
- func (s *Span) IsExportMetricsSpan() bool
- func (s *Span) IsExportTracesSpan() bool
- func (s *Span) IsSelfReferenceSpan() bool
- func (s *Span) IsValid() bool
- func (s Span) MarshalJSON() ([]byte, error)
- func (s *Span) RequestLength() int64
- func (s *Span) ServiceGraphKind() string
- func (s *Span) SetIgnoreMetrics()
- func (s *Span) SetIgnoreTraces()
- func (s *Span) Timings() Timings
- func (s *Span) TraceName() string
- type SpanAttributes
- type Timings
Constants ¶
const ( MessagingPublish = "publish" MessagingProcess = "process" )
const (
SchemeHostSeparator = ";"
)
Variables ¶
This section is empty.
Functions ¶
func ClientAddr ¶
func ClientMetric ¶
func ClientNamespaceMetric ¶
func ConnectionTypeMetric ¶
func CudaKernel ¶
func DBCollectionName ¶
func DBOperationName ¶
func DBQueryText ¶
func DBSystemName ¶
func GrpcSpanStatusCode ¶
https://opentelemetry.io/docs/specs/otel/trace/semantic_conventions/rpc/#grpc-status
func HTTPClientHost ¶
func HTTPRequestBodySize ¶
func HTTPRequestMethod ¶
func HTTPResponseStatusCode ¶
func HTTPScheme ¶
func HTTPSpanStatusCode ¶
https://opentelemetry.io/docs/specs/otel/trace/semantic_conventions/http/#status
func HTTPUrlFull ¶
func HTTPUrlPath ¶
func HostAsServer ¶
func MessagingOperationType ¶
func PeerAsClient ¶
func ServerAddr ¶
func ServerMetric ¶
func ServerNamespaceMetric ¶
func ServerPort ¶
func ServiceMetric ¶
func SourceMetric ¶
func SpanKindMetric ¶
func SpanNameMetric ¶
func SpanOTELGetters ¶
SpanOTELGetters returns the attributes.Getter function that returns the OTEL attribute.KeyValue of a given attribute name. nolint:cyclop
func SpanPromGetters ¶
SpanPromGetters returns the attributes.Getter function that returns the Prometheus string value of a given attribute name. nolint:cyclop
func SpanStatusCode ¶
func StatusCodeMetric ¶
Types ¶
type EventType ¶
type EventType uint8
const ( // EventTypeProcessAlive is an internal signal. It will be ignored by the metrics exporters. EventTypeProcessAlive EventType = iota EventTypeHTTP EventTypeGRPC EventTypeHTTPClient EventTypeGRPCClient EventTypeSQLClient EventTypeRedisClient EventTypeKafkaClient EventTypeRedisServer EventTypeKafkaServer EventTypeGPUKernelLaunch EventTypeGPUMalloc )
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 ¶
type PidInfo ¶
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:"-"` Service svc.Attrs `json:"-"` 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:"-"` SubType int `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) DBSystemName ¶
func (*Span) HasOriginalHost ¶
func (*Span) IgnoreMetrics ¶
func (*Span) IgnoreTraces ¶
func (*Span) InternalSignal ¶
InternalSignal returns whether a span is not aimed to be exported as a metric or a trace, because it's used to internally send messages through the pipeline.
func (*Span) IsClientSpan ¶
func (*Span) IsExportMetricsSpan ¶
func (*Span) IsExportTracesSpan ¶
func (*Span) IsSelfReferenceSpan ¶
func (Span) MarshalJSON ¶
func (*Span) RequestLength ¶
func (*Span) ServiceGraphKind ¶
ServiceGraphKind returns the Kind string representation that is compliant with service graph metrics specification
func (*Span) SetIgnoreMetrics ¶
func (s *Span) SetIgnoreMetrics()
func (*Span) SetIgnoreTraces ¶
func (s *Span) SetIgnoreTraces()
type SpanAttributes ¶
helper attribute functions used by JSON serialization