telemetry

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KubeFox Attribute Keys
	AttrKeyComponentApp       = "kubefox.component.app"
	AttrKeyComponentHash      = "kubefox.component.hash"
	AttrKeyComponentId        = "kubefox.component.id"
	AttrKeyComponentName      = "kubefox.component.name"
	AttrKeyComponentType      = "kubefox.component.type"
	AttrKeyEventAppDeployment = "kubefox.event.context.app_deployment"
	AttrKeyEventCategory      = "kubefox.event.category"
	AttrKeyEventId            = "kubefox.event.id"
	AttrKeyEventParentId      = "kubefox.event.parent_id"
	AttrKeyEventRelManifest   = "kubefox.event.context.release_manifest"
	AttrKeyEventSourceHash    = "kubefox.event.source.hash"
	AttrKeyEventSourceId      = "kubefox.event.source.id"
	AttrKeyEventSourceName    = "kubefox.event.source.name"
	AttrKeyEventSourceType    = "kubefox.event.source.type"
	AttrKeyEventTargetHash    = "kubefox.event.target.hash"
	AttrKeyEventTargetId      = "kubefox.event.target.id"
	AttrKeyEventTargetName    = "kubefox.event.target.name"
	AttrKeyEventTargetType    = "kubefox.event.target.type"
	AttrKeyEventTTL           = "kubefox.event.ttl"
	AttrKeyEventType          = "kubefox.event.type"
	AttrKeyEventVirtualEnv    = "kubefox.event.context.virtual_environment"
	AttrKeyInstance           = "kubefox.instance"
	AttrKeyPlatform           = "kubefox.platform"
	AttrKeyRouteId            = "kubefox.route.id"

	// OTEL Attribute Keys
	AttrKeySDKLang    = "telemetry.sdk.language" // Required
	AttrKeySDKName    = "telemetry.sdk.name"     // Required
	AttrKeySDKVersion = "telemetry.sdk.version"  // Required
	AttrKeySvcName    = "service.name"           // Required

	AttrKeyCloudAccountId        = "cloud.account.id"
	AttrKeyCloudAZ               = "cloud.availability_zone"
	AttrKeyCloudPlatform         = "cloud.platform"
	AttrKeyCloudProvider         = "cloud.provider"
	AttrKeyCloudRegion           = "cloud.region"
	AttrKeyCloudResourceId       = "cloud.resource_id"
	AttrKeyCodeColumn            = "code.column"
	AttrKeyCodeFilepath          = "code.filepath"
	AttrKeyCodeFunction          = "code.function"
	AttrKeyCodeLineNo            = "code.lineno"
	AttrKeyCodeNamespace         = "code.namespace"
	AttrKeyCodeStacktrace        = "code.stacktrace"
	AttrKeyContainerArgs         = "container.command_args"
	AttrKeyContainerCommand      = "container.command"
	AttrKeyContainerId           = "container.id"
	AttrKeyContainerImageDigest  = "container.image.repo_digests"
	AttrKeyContainerImageId      = "container.image.id"
	AttrKeyContainerImageName    = "container.image.name"
	AttrKeyContainerName         = "container.name"
	AttrKeyErrType               = "error.type"
	AttrKeyExceptionMsg          = "exception.message"
	AttrKeyExceptionStacktrace   = "exception.stacktrace"
	AttrKeyExceptionType         = "exception.type"
	AttrKeyGraphQLDocument       = "graphql.document"
	AttrKeyGraphQLOpName         = "graphql.operation.name"
	AttrKeyGraphQLOpType         = "graphql.operation.type" // query, mutation, subscription
	AttrKeyGRPCStatusCode        = "rpc.grpc.status_code"
	AttrKeyHTTPReqBodySize       = "http.request.body.size"
	AttrKeyHTTPReqMethod         = "http.request.method"
	AttrKeyHTTPRespBodySize      = "http.response.body.size"
	AttrKeyHTTPRespStatusCode    = "http.response.status_code"
	AttrKeyHTTPRoute             = "http.route"
	AttrKeyK8sClusterId          = "k8s.cluster.uid"
	AttrKeyK8sClusterName        = "k8s.cluster.name"
	AttrKeyK8sContainerName      = "k8s.container.name"
	AttrKeyK8sContainerRestart   = "k8s.container.restart_count"
	AttrKeyK8sNamespace          = "k8s.namespace.name"
	AttrKeyK8sNodeId             = "k8s.node.uid"
	AttrKeyK8sNodeName           = "k8s.node.name"
	AttrKeyK8sPodId              = "k8s.pod.uid"
	AttrKeyK8sPodName            = "k8s.pod.name"
	AttrKeyMsgId                 = "message.id"
	AttrKeyMsgSize               = "message.uncompressed_size"
	AttrKeyMsgType               = "message.type" // SENT, RECEIVED
	AttrKeyNetworkProtocol       = "network.protocol.name"
	AttrKeyOCIManifestDigest     = "oci.manifest.digest"
	AttrKeyOTELStatusCode        = "otel.status_code" // OK, ERROR
	AttrKeyOTELStatusDescription = "otel.status_description"
	AttrKeySvcInstanceId         = "service.instance.id"
	AttrKeySvcNamespace          = "service.namespace"
	AttrKeySvcVersion            = "service.version"
	AttrKeyThreadId              = "thread.id"
	AttrKeyThreadName            = "thread.name"
	AttrKeyURLFull               = "url.full"
	AttrKeyURLPath               = "url.path"
	AttrKeyURLQuery              = "url.query"
	AttrKeyURLScheme             = "url.scheme"
	AttrKeyUserAgent             = "user_agent.original"

	// Event names
	EventNameException = "exception"
)

Variables

This section is empty.

Functions

func Resource

func Resource() *resv1.Resource

func SetComponent

func SetComponent(comp *core.Component, attrs ...Attribute)

Types

type Attribute

type Attribute struct {
	*commonv1.KeyValue
}

func Attr added in v0.7.0

func Attr(key string, val any) Attribute

type Span

type Span struct {
	*tracev1.Span

	ChildSpans []*Span
	LogRecords []*logsv1.LogRecord
	// contains filtered or unexported fields
}

func StartSpan

func StartSpan(name string, parent *core.SpanContext, attrs ...Attribute) *Span

func (*Span) Debug added in v0.7.0

func (s *Span) Debug(msg string)

func (*Span) End

func (s *Span) End(errs ...error)

End sets the span's and its children's end times. If an end time has already been set it will not be modified.

func (*Span) Flatten added in v0.7.0

func (s *Span) Flatten() []*Span

func (*Span) Info added in v0.7.0

func (s *Span) Info(msg string)

func (*Span) Record added in v0.7.2

func (s *Span) Record() bool

func (*Span) RecordErr added in v0.7.0

func (s *Span) RecordErr(err error)

func (*Span) SetAttributes added in v0.7.0

func (s *Span) SetAttributes(attrs ...Attribute)

func (*Span) SetEventAttributes added in v0.7.0

func (s *Span) SetEventAttributes(evt *core.Event)

func (*Span) SetRecord added in v0.7.2

func (s *Span) SetRecord(record bool)

func (*Span) SpanContext

func (s *Span) SpanContext() *core.SpanContext

func (*Span) StartChildSpan added in v0.7.0

func (s *Span) StartChildSpan(name string, attrs ...Attribute) *Span

Jump to

Keyboard shortcuts

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