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 DBCollectionName(val string) attribute.KeyValue
- func DBOperationName(val string) attribute.KeyValue
- func DBQueryText(val string) attribute.KeyValue
- func DBSystem(val string) attribute.KeyValue
- func ErrorType(val string) attribute.KeyValue
- func GrpcSpanStatusCode(span *Span) codes.Code
- func HTTPRequestBodySize(val int) attribute.KeyValue
- func HTTPRequestMethod(val string) attribute.KeyValue
- func HTTPResponseStatusCode(val int) attribute.KeyValue
- func HTTPSpanStatusCode(span *Span) codes.Code
- func HTTPUrlFull(val string) attribute.KeyValue
- func HTTPUrlPath(val string) attribute.KeyValue
- func MessagingOperationType(val string) attribute.KeyValue
- 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
- type EventType
- type PidInfo
- type Span
- func (s *Span) IgnoreMetrics() bool
- func (s *Span) IgnoreTraces() bool
- func (s *Span) Inside(parent *Span) 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" )
Variables ¶
This section is empty.
Functions ¶
func ClientAddr ¶ added in v1.6.0
func ClientMetric ¶ added in v1.6.0
func ClientNamespaceMetric ¶ added in v1.6.0
func ConnectionTypeMetric ¶ added in v1.6.0
func DBCollectionName ¶ added in v1.7.0
func DBOperationName ¶ added in v1.7.0
func DBQueryText ¶ added in v1.7.0
func GrpcSpanStatusCode ¶ added in v1.7.0
https://opentelemetry.io/docs/specs/otel/trace/semantic_conventions/rpc/#grpc-status
func HTTPRequestBodySize ¶ added in v1.6.0
func HTTPRequestMethod ¶ added in v1.6.0
func HTTPResponseStatusCode ¶ added in v1.6.0
func HTTPSpanStatusCode ¶ added in v1.7.0
https://opentelemetry.io/docs/specs/otel/trace/semantic_conventions/http/#status
func HTTPUrlFull ¶ added in v1.6.0
func HTTPUrlPath ¶ added in v1.6.0
func MessagingOperationType ¶ added in v1.7.0
func ServerAddr ¶ added in v1.6.0
func ServerMetric ¶ added in v1.6.0
func ServerNamespaceMetric ¶ added in v1.6.0
func ServerPort ¶ added in v1.6.0
func ServiceMetric ¶ added in v1.6.0
func SourceMetric ¶ added in v1.6.0
func SpanKindMetric ¶ added in v1.6.0
func SpanNameMetric ¶ added in v1.6.0
func SpanOTELGetters ¶ added in v1.6.0
SpanOTELGetters returns the attributes.Getter function that returns the OTEL attribute.KeyValue of a given attribute name. nolint:cyclop
func SpanPromGetters ¶ added in v1.6.0
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 StatusCodeMetric ¶ added in v1.6.0
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
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) IgnoreMetrics ¶ added in v1.8.0
func (*Span) IgnoreTraces ¶ added in v1.8.0
func (*Span) IsClientSpan ¶ added in v1.5.0
func (*Span) IsExportMetricsSpan ¶ added in v1.8.0
func (*Span) IsExportTracesSpan ¶ added in v1.8.0
func (*Span) IsSelfReferenceSpan ¶ added in v1.8.0
func (Span) MarshalJSON ¶ added in v1.7.0
func (*Span) RequestLength ¶ added in v1.7.0
func (*Span) ServiceGraphKind ¶ added in v1.7.0
ServiceGraphKind returns the Kind string representation that is compliant with service graph metrics specification
func (*Span) SetIgnoreMetrics ¶ added in v1.8.0
func (s *Span) SetIgnoreMetrics()
func (*Span) SetIgnoreTraces ¶ added in v1.8.0
func (s *Span) SetIgnoreTraces()
type SpanAttributes ¶ added in v1.7.0
helper attribute functions used by JSON serialization