Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertResourceOt(props *management.InstanceProperties) map[string]string
- func GetResourceSemanticConventionAttributeNames() []string
- func InitComponentMapping(additionMapping map[int32]string) map[int32]string
- type CLRMetricHandler
- type Input
- type JVMMetricHandler
- type ManagementHandler
- type MeterHandler
- type OtSpan
- type OtSpanRef
- type ProfileHandler
- func (*ProfileHandler) CollectSnapshot(srv profile.ProfileTask_CollectSnapshotServer) error
- func (*ProfileHandler) GetProfileTaskCommands(ctx context.Context, req *profile.ProfileTaskCommandQuery) (*common.Commands, error)
- func (*ProfileHandler) ReportTaskFinish(ctx context.Context, req *profile.ProfileTaskFinishReport) (*common.Commands, error)
- type ResourcePropertiesCache
- type SampleStatus
- type StatusCode
- type TracingHandler
Constants ¶
const ( AttributeCloudAccount = "cloud.account.id" AttributeCloudProvider = "cloud.provider" AttributeCloudRegion = "cloud.region" AttributeCloudZone = "cloud.zone" AttributeContainerID = "container.id" AttributeContainerImage = "container.image.name" AttributeContainerName = "container.name" AttributeContainerTag = "container.image.tag" AttributeDeploymentEnvironment = "deployment.environment" AttributeFaasID = "faas.id" AttributeFaasInstance = "faas.instance" AttributeFaasName = "faas.name" AttributeFaasVersion = "faas.version" AttributeHostID = "host.id" AttributeHostImageID = "host.image.id" AttributeHostImageName = "host.image.name" AttributeHostImageVersion = "host.image.version" AttributeHostName = "host.name" AttributeHostType = "host.type" AttributeK8sCluster = "k8s.cluster.name" AttributeK8sContainer = "k8s.container.name" AttributeK8sCronJob = "k8s.cronjob.name" AttributeK8sCronJobUID = "k8s.cronjob.uid" AttributeK8sDaemonSet = "k8s.daemonset.name" AttributeK8sDaemonSetUID = "k8s.daemonset.uid" AttributeK8sDeployment = "k8s.deployment.name" AttributeK8sDeploymentUID = "k8s.deployment.uid" AttributeK8sJob = "k8s.job.name" AttributeK8sJobUID = "k8s.job.uid" AttributeK8sNamespace = "k8s.namespace.name" AttributeK8sPod = "k8s.pod.name" AttributeK8sPodUID = "k8s.pod.uid" AttributeK8sReplicaSet = "k8s.replicaset.name" AttributeK8sReplicaSetUID = "k8s.replicaset.uid" AttributeK8sStatefulSet = "k8s.statefulset.name" AttributeK8sStatefulSetUID = "k8s.statefulset.uid" AttributeOSType = "os.type" AttributeOSDescription = "os.description" AttributeProcessCommand = "process.command" AttributeProcessCommandLine = "process.command_line" AttributeProcessExecutableName = "process.executable.name" AttributeProcessExecutablePath = "process.executable.path" AttributeProcessID = "process.pid" AttributeProcessOwner = "process.owner" AttributeServiceInstance = "service.instance.id" AttributeServiceName = "service.name" AttributeServiceNamespace = "service.namespace" AttributeServiceVersion = "service.version" AttributeTelemetryAutoVersion = "telemetry.auto.version" AttributeTelemetrySDKLanguage = "telemetry.sdk.language" AttributeTelemetrySDKName = "telemetry.sdk.name" AttributeTelemetrySDKVersion = "telemetry.sdk.version" )
OpenTelemetry Semantic Convention values for Resource attribute names. See: https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions/README.md
const ( AttributeSDKLangValueCPP = "cpp" AttributeSDKLangValueDotNET = "dotnet" AttributeSDKLangValueErlang = "erlang" AttributeSDKLangValueGo = "go" AttributeSDKLangValueJava = "java" AttributeSDKLangValueNodeJS = "nodejs" AttributeSDKLangValuePHP = "php" AttributeSDKLangValuePython = "python" AttributeSDKLangValueRuby = "ruby" AttributeSDKLangValueWebJS = "webjs" )
OpenTelemetry Semantic Convention values for Resource attribute "telemetry.sdk.language" values. See: https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions/README.md
const ( AttributeCloudProviderAWS = "aws" AttributeCloudProviderAzure = "azure" AttributeCloudProviderGCP = "gcp" )
OpenTelemetry Semantic Convention values for Resource attribute "cloud.provider" values. See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/semantic_conventions/cloud.md
const ( AttributeComponent = "component" AttributeEnduserID = "enduser.id" AttributeEnduserRole = "enduser.role" AttributeEnduserScope = "enduser.scope" AttributeNetHostIP = "net.host.ip" AttributeNetHostName = "net.host.name" AttributeNetHostPort = "net.host.port" AttributeNetPeerIP = "net.peer.ip" AttributeNetPeerName = "net.peer.name" AttributeNetPeerPort = "net.peer.port" AttributeNetTransport = "net.transport" AttributePeerService = "peer.service" )
OpenTelemetry Semantic Convention values for general Span attribute names. See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/span-general.md
const ( ComponentTypeHTTP = "http" ComponentTypeGRPC = "grpc" )
OpenTelemetry Semantic Convention values for component attribute values. Possibly being removed due to issue #336
const ( AttributeHTTPClientIP = "http.client_ip" AttributeHTTPFlavor = "http.flavor" AttributeHTTPHost = "http.host" AttributeHTTPHostName = "host.name" AttributeHTTPHostPort = "host.port" AttributeHTTPMethod = "http.method" AttributeHTTPRequestContentLength = "http.request_content_length" AttributeHTTPRequestContentLengthUncompressed = "http.request_content_length_uncompressed" AttributeHTTPResponseContentLength = "http.response_content_length" AttributeHTTPResponseContentLengthUncompressed = "http.response_content_length_uncompressed" AttributeHTTPRoute = "http.route" AttributeHTTPScheme = "http.scheme" AttributeHTTPServerName = "http.server_name" AttributeHTTPStatusCode = "http.status_code" AttributeHTTPStatusText = "http.status_text" AttributeHTTPTarget = "http.target" AttributeHTTPURL = "http.url" AttributeHTTPUserAgent = "http.user_agent" )
OpenTelemetry Semantic Convention attribute names for HTTP related attributes See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/http.md
const ( AttributeDBConnectionString = "db.connection_string" AttributeDBCassandraKeyspace = "db.cassandra.keyspace" AttributeDBHBaseNamespace = "db.hbase.namespace" AttributeDBJDBCDriverClassname = "db.jdbc.driver_classname" AttributeDBMongoDBCollection = "db.mongodb.collection" AttributeDBMsSQLInstanceName = "db.mssql.instance_name" AttributeDBName = "db.name" AttributeDBOperation = "db.operation" AttributeDBRedisDatabaseIndex = "db.redis.database_index" AttributeDBStatement = "db.statement" AttributeDBSystem = "db.system" AttributeDBUser = "db.user" )
OpenTelemetry Semantic Convention attribute names for database related attributes See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/database.md
const ( AttributeMessageCompressedSize = "message.compressed_size" AttributeMessageID = "message.id" AttributeMessageType = "message.type" AttributeMessageUncompressedSize = "message.uncompressed_size" AttributeRPCMethod = "rpc.method" AttributeRPCService = "rpc.service" AttributeRPCSystem = "rpc.system" EventTypeMessage = "message" MessageTypeReceived = "RECEIVED" MessageTypeSent = "SENT" )
OpenTelemetry Semantic Convention attribute names for gRPC related attributes See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/rpc.md
const ( AttributeFaaSCron = "faas.cron" AttributeFaaSDocumentCollection = "faas.document.collection" AttributeFaaSDocumentName = "faas.document.name" AttributeFaaSDocumentOperation = "faas.document.operation" AttributeFaaSDocumentTime = "faas.document.time" AttributeFaaSExecution = "faas.execution" AttributeFaaSTime = "faas.time" AttributeFaaSTrigger = "faas.trigger" FaaSTriggerDataSource = "datasource" FaaSTriggerHTTP = "http" FaaSTriggerOther = "other" FaaSTriggerPubSub = "pubsub" FaaSTriggerTimer = "timer" )
OpenTelemetry Semantic Convention attribute names for FaaS related attributes See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/faas.md
const ( AttributeMessagingConversationID = "messaging.conversation_id" AttributeMessagingDestination = "messaging.destination" AttributeMessagingDestinationKind = "messaging.destination_kind" AttributeMessagingMessageID = "messaging.message_id" AttributeMessagingOperation = "messaging.operation" AttributeMessagingPayloadCompressedSize = "messaging.message_payload_compressed_size_bytes" AttributeMessagingPayloadSize = "messaging.message_payload_size_bytes" AttributeMessagingProtocol = "messaging.protocol" AttributeMessagingProtocolVersion = "messaging.protocol_version" AttributeMessagingSystem = "messaging.system" AttributeMessagingTempDestination = "messaging.temp_destination" AttributeMessagingURL = "messaging.url" )
OpenTelemetry Semantic Convention attribute names for messaging system related attributes See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/messaging.md
const ( AttributeExceptionEventName = "exception" AttributeExceptionMessage = "exception.message" AttributeExceptionStacktrace = "exception.stacktrace" AttributeExceptionType = "exception.type" )
OpenTelemetry Semantic Convention attribute names for exceptions See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/exceptions.md
const ( OpenTracingSpanKindUnspecified = "" OpenTracingSpanKindClient = "client" OpenTracingSpanKindServer = "server" OpenTracingSpanKindConsumer = "consumer" OpenTracingSpanKindProducer = "producer" OpenTracingSpanKindInternal = "internal" )
OpenTracingSpanKind are possible values for TagSpanKind and match the OpenTracing conventions: https://github.com/opentracing/specification/blob/master/semantic_conventions.md These values are used for representing span kinds that have no equivalents in OpenCensus format. They are stored as values of TagSpanKind
const CheckpointKey string = "skywalking_instance_properties"
Variables ¶
var OtResourceMapping = map[string]string{ "hostname": AttributeHostName, "Process No.": AttributeProcessID, "OS Name": AttributeOSType, "language": AttributeTelemetrySDKLanguage, }
map to open telemetry
var OtSpanTagsMapping = map[string]string{ "url": AttributeHTTPURL, "status_code": AttributeHTTPStatusCode, "db.type": AttributeDBSystem, "db.instance": AttributeDBName, "mq.broker": AttributeNetPeerName, }
Functions ¶
func ConvertResourceOt ¶
func ConvertResourceOt(props *management.InstanceProperties) map[string]string
func GetResourceSemanticConventionAttributeNames ¶
func GetResourceSemanticConventionAttributeNames() []string
GetResourceSemanticConventionAttributeNames a slice with all the Resource Semantic Conventions attribute names.
Types ¶
type CLRMetricHandler ¶
type CLRMetricHandler struct {
// contains filtered or unexported fields
}
func (*CLRMetricHandler) Collect ¶
func (c *CLRMetricHandler) Collect(ctx context.Context, req *agent.CLRMetricCollection) (*common.Commands, error)
type Input ¶
type Input struct { MetricIntervalMs int64 Address string ComponentMapping map[int32]string // contains filtered or unexported fields }
func (*Input) Collect ¶
Collect takes in an accumulator and adds the metrics that the Input gathers. This is called every "interval"
func (*Input) Description ¶
Description returns a one-sentence description on the Input
func (*Input) Init ¶
Init called for init some system resources, like socket, mutex... return interval(ms) and error flag, if interval is 0, use default interval
type JVMMetricHandler ¶
type JVMMetricHandler struct {
// contains filtered or unexported fields
}
func (*JVMMetricHandler) Collect ¶
func (h *JVMMetricHandler) Collect(ctx context.Context, req *skywalking.JVMMetricCollection) (*v3.Commands, error)
type ManagementHandler ¶
type ManagementHandler struct {
// contains filtered or unexported fields
}
func NewManagementHandler ¶
func NewManagementHandler(context ilogtail.Context, collector ilogtail.Collector, cache *ResourcePropertiesCache) *ManagementHandler
func (*ManagementHandler) KeepAlive ¶
func (*ManagementHandler) KeepAlive(ctx context.Context, req *management.InstancePingPkg) (*v3.Commands, error)
func (*ManagementHandler) ReportInstanceProperties ¶
func (m *ManagementHandler) ReportInstanceProperties(ctx context.Context, req *management.InstanceProperties) (*v3.Commands, error)
type MeterHandler ¶
type MeterHandler struct {
// contains filtered or unexported fields
}
func (*MeterHandler) Collect ¶
func (m *MeterHandler) Collect(srv agent.MeterReportService_CollectServer) error
type OtSpan ¶
type OtSpan struct { Host string `json:"host"` Service string `json:"service"` Resource map[string]string `json:"resource,omitempty"` Name string `json:"name"` Kind string `json:"kind"` TraceID string `json:"traceID"` SpanID string `json:"spanID"` ParentSpanID string `json:"parentSpanID"` Links []*OtSpanRef `json:"links,omitempty"` Logs []map[string]string `json:"logs,omitempty"` TraceState string `json:"traceState"` Start int64 `json:"start"` End int64 `json:"end"` Duration int64 `json:"duration"` Attribute map[string]string `json:"attribute,omitempty"` StatusCode StatusCode `json:"statusCode"` StatusMessage string `json:"statusMessage,omitempty"` Raw string `json:"raw,omitempty"` }
func ParseSegment ¶
func ParseSegment(span *v3.SpanObject, segment *v3.SegmentObject, cache *ResourcePropertiesCache, mapping map[int32]string) *OtSpan
type ProfileHandler ¶
type ProfileHandler struct{}
func (*ProfileHandler) CollectSnapshot ¶
func (*ProfileHandler) CollectSnapshot(srv profile.ProfileTask_CollectSnapshotServer) error
func (*ProfileHandler) GetProfileTaskCommands ¶
func (*ProfileHandler) GetProfileTaskCommands(ctx context.Context, req *profile.ProfileTaskCommandQuery) (*common.Commands, error)
func (*ProfileHandler) ReportTaskFinish ¶
func (*ProfileHandler) ReportTaskFinish(ctx context.Context, req *profile.ProfileTaskFinishReport) (*common.Commands, error)
type ResourcePropertiesCache ¶
type ResourcePropertiesCache struct {
// contains filtered or unexported fields
}
type SampleStatus ¶
type SampleStatus int
type StatusCode ¶
type StatusCode string
const ( StatusCodeOk StatusCode = "OK" StatusCodeError StatusCode = "ERROR" )
type TracingHandler ¶
type TracingHandler struct {
// contains filtered or unexported fields
}
func (*TracingHandler) Collect ¶
func (h *TracingHandler) Collect(srv skywalking.TraceSegmentReportService_CollectServer) error
func (*TracingHandler) CollectInSync ¶
func (h *TracingHandler) CollectInSync(ctx context.Context, req *skywalking.SegmentCollection) (*v3.Commands, error)