Documentation ¶
Index ¶
Constants ¶
View Source
const ( // (DEPRECATED) Common Resource attributes LogSource = "log_source" LogType = "log_type" KubernetesContainerName = "kubernetes.container_name" KubernetesHost = "kubernetes.host" KubernetesPodName = "kubernetes.pod_name" KubernetesNamespaceName = "kubernetes.namespace_name" OpenshiftClusterID = "openshift.cluster_id" // Common Resource attributes OpenshiftClusterUID = "openshift.cluster.uid" OpenshiftLogSource = "openshift.log.source" OpenshiftLogType = "openshift.log.type" OpenshiftLabelPrefix = "openshift.label." // Common to container, node(journal), auditd NodeName = "k8s.node.name" Level = "level" // Container Resource Attributes K8sNamespaceName = "k8s.namespace.name" K8sContainerName = "k8s.container.name" K8sPodName = "k8s.pod.name" K8sPodID = "k8s.pod.uid" // Container LogRecord Resource Attributes LogIOStream = "log.iostream" // Journal Resource Attributes ProcessExeName = "process.executable.name" ProcessExePath = "process.executable.path" ProcessCommandLine = "process.command_line" ProcessPID = "process.pid" ServiceName = "service.name" // Journal LogRecord Attributes SystemTPrefix = "systemd.t." SystemUPrefix = "systemd.u." // Audit (Kubernetes Events) LogRecord Attributes K8sEventLevel = "k8s.audit.event.level" K8sEventStage = "k8s.audit.event.stage" K8sEventUserAgent = "k8s.audit.event.user_agent" K8sEventRequestURI = "k8s.audit.event.request.uri" K8sEventResponseCode = "k8s.audit.event.response.code" K8sEventAnnotationPrefix = "k8s.audit.event.annotation." K8sEventObjectRefResource = "k8s.audit.event.object_ref.resource" K8sEventObjectRefName = "k8s.audit.event.object_ref.name" K8sEventObjectRefNamespace = "k8s.audit.event.object_ref.namespace" K8sEventObjectRefAPIGroup = "k8s.audit.event.object_ref.api_group" K8sEventObjectRefAPIVersion = "k8s.audit.event.object_ref.api_version" K8sUserUsername = "k8s.user.username" K8sUserGroups = "k8s.user.groups" )
Variables ¶
This section is empty.
Functions ¶
func CollectNames ¶
Types ¶
type ArrayValue ¶
type ArrayValue struct {
Values []StringValue `json:"values,omitempty"`
}
func (ArrayValue) List ¶
func (v ArrayValue) List() []string
type Attribute ¶
type Attribute struct { Key string `json:"key,omitempty"` Value AttributeValue `json:"value,omitempty"` }
type AttributeValue ¶
type AttributeValue struct { StringValue *string `json:"stringValue,omitempty"` Bool bool `json:"boolValue,omitempty"` Int *string `json:"intValue,omitempty"` //proto example defines as a string Float float64 `json:"doubleValue,omitempty"` Array ArrayValue `json:"arrayValue,omitempty"` Map KVListValue `json:"kvlistValue,omitempty"` }
func (AttributeValue) String ¶
func (av AttributeValue) String() string
type KVListValue ¶
type KVListValue struct {
Values []AttributeValue `json:"values,omitempty"`
}
type LogRecord ¶
type LogRecord struct { TimeUnixNano string `json:"timeUnixNano,omitempty"` ObservedTimeUnixNano string `json:"observedTimeUnixNano,omitempty"` SeverityNumber int `json:"severityNumber,omitempty"` SeverityText string `json:"severityText,omitempty"` TraceID string `json:"traceId,omitempty"` SpanID string `json:"spanId,omitempty"` Body StringValue `json:"body,omitempty"` Attributes []Attribute `json:"attributes,omitempty"` }
func (LogRecord) Attribute ¶
func (l LogRecord) Attribute(name string) AttributeValue
type Logs ¶
type Logs struct {
ResourceLogs []ResourceLog `json:"resourceLogs,omitempty"`
}
type Resource ¶
type Resource struct {
Attributes []Attribute `json:"attributes,omitempty"`
}
func (Resource) Attribute ¶
func (r Resource) Attribute(name string) AttributeValue
type ResourceLog ¶
type StringValue ¶
type StringValue struct {
StringValue string `json:"stringValue,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.