github.com/datadog/cilium@v1.6.12/pkg/logging/logfields/logfields.go (about)

     1  // Copyright 2017-2018 Authors of Cilium
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Package logfields defines common logging fields which are used across packages
    16  package logfields
    17  
    18  const (
    19  
    20  	// LogSubsys is the field denoting the subsystem when logging
    21  	LogSubsys = "subsys"
    22  
    23  	// Signal is the field to print os signals on exit etc.
    24  	Signal = "signal"
    25  
    26  	// Node is a host machine in the cluster, running cilium
    27  	Node = "node"
    28  
    29  	// NodeName is a human readable name for the node
    30  	NodeName = "nodeName"
    31  
    32  	// EndpointID is the numeric endpoint identifier
    33  	EndpointID = "endpointID"
    34  
    35  	// EndpointState is the current endpoint state
    36  	EndpointState = "endpointState"
    37  
    38  	// EventUUID is an event unique identifier
    39  	EventUUID = "eventID"
    40  
    41  	// ContainerID is the container identifier
    42  	ContainerID = "containerID"
    43  
    44  	// IdentityLabels are the labels relevant for the security identity
    45  	IdentityLabels = "identityLabels"
    46  
    47  	// InfoLabels are the labels relevant for the security identity
    48  	InfoLabels = "infoLabels"
    49  
    50  	// Labels are any label, they may not be relevant to the security identity.
    51  	Labels = "labels"
    52  
    53  	// Controller is the name of the controller to log it.
    54  	Controller = "controller"
    55  
    56  	// Identity is the identifier of a security identity
    57  	Identity = "identity"
    58  
    59  	// OldIdentity is a previously used security identity
    60  	OldIdentity = "oldIdentity"
    61  
    62  	// PolicyRevision is the revision of the policy in the repository or of
    63  	// the object in question
    64  	PolicyRevision = "policyRevision"
    65  
    66  	// DatapathPolicyRevision is the policy revision currently running in
    67  	// the datapath
    68  	DatapathPolicyRevision = "datapathPolicyRevision"
    69  
    70  	// DesiredPolicyRevision is the latest policy revision as evaluated for
    71  	// an endpoint. It is the desired policy revision to be implemented
    72  	// into the datapath.
    73  	DesiredPolicyRevision = "desiredPolicyRevision"
    74  
    75  	// PolicyID is the identifier of a L3, L4 or L7 Policy. Ideally the .NumericIdentity
    76  	PolicyID = "policyID"
    77  
    78  	// AddedPolicyID is the .NumericIdentity, or set or them
    79  	AddedPolicyID = "policyID.Added"
    80  
    81  	// DeletedPolicyID is the .NumericIdentity, or set or them
    82  	DeletedPolicyID = "policyID.Deleted"
    83  
    84  	// L3PolicyID is the identifier of a L3 Policy
    85  	L3PolicyID = "policyID.L3"
    86  
    87  	// L4PolicyID is the identifier of a L4 Policy
    88  	L4PolicyID = "PolicyID.L4"
    89  
    90  	// DNSName is a FQDN or not fully qualified name intended for DNS lookups
    91  	DNSName = "dnsName"
    92  
    93  	// DNSRequestID is the DNS request id used by dns-proxy
    94  	DNSRequestID = "DNSRequestID"
    95  
    96  	// IPAddr is an IPV4 or IPv6 address
    97  	IPAddr = "ipAddr"
    98  
    99  	// IPMask is an IPV4 or IPv6 address mask
   100  	IPMask = "ipMask"
   101  
   102  	// IPv4 is an IPv4 address
   103  	IPv4 = "ipv4"
   104  
   105  	// IPv6 is an IPv6 address
   106  	IPv6 = "ipv6"
   107  
   108  	// BuildDuration is the time elapsed to build a BPF program
   109  	BuildDuration = "buildDuration"
   110  
   111  	// BPFCompilationTime is the time elapsed to build a BPF endpoint program
   112  	BPFCompilationTime = "BPFCompilationTime"
   113  
   114  	// EndpointRegenerationTime is the time elapsed to generate an endpoint
   115  	EndpointRegenerationTime = "endpointRegenerationTime"
   116  
   117  	// StartTime is the start time of an event
   118  	StartTime = "startTime"
   119  
   120  	// EndTime is the end time of an event
   121  	EndTime = "endTime"
   122  
   123  	// Duration is the duration of a measured operation
   124  	Duration = "duration"
   125  
   126  	// V4HealthIP is an address used to contact the cilium-health endpoint
   127  	V4HealthIP = "v4healthIP.IPv4"
   128  
   129  	// V6HealthIP is an address used to contact the cilium-health endpoint
   130  	V6HealthIP = "v6healthIP.IPv6"
   131  
   132  	// V4CiliumHostIP is an address used for the cilium_host interface.
   133  	V4CiliumHostIP = "v4CiliumHostIP.IPv4"
   134  
   135  	// V6CiliumHostIP is an address used for the cilium_host interface.
   136  	V6CiliumHostIP = "v6CiliumHostIP.IPv6"
   137  
   138  	// L3n4Addr is a L3 (IP) + L4 (port and protocol) address object.
   139  	L3n4Addr = "l3n4Addr"
   140  
   141  	// L3n4AddrID is the allocated ID for a L3n4Addr object
   142  	L3n4AddrID = "l3n4AddrID"
   143  
   144  	// Port is a L4 port
   145  	Port = "port"
   146  
   147  	// Family is the L3 protocol family
   148  	Family = "family"
   149  
   150  	// Protocol is the L4 protocol
   151  	Protocol = "protocol"
   152  
   153  	// V4Prefix is a IPv4 subnet/CIDR prefix
   154  	V4Prefix = "v4Prefix"
   155  
   156  	// V6Prefix is a IPv6 subnet/CIDR prefix
   157  	V6Prefix = "v6Prefix"
   158  
   159  	// Interface is an interface id/name on the system
   160  	Interface = "interface"
   161  
   162  	// Ipvlan is a ipvlan object or ID
   163  	Ipvlan = "ipvlan"
   164  
   165  	// Veth is a veth object or ID
   166  	Veth = "veth"
   167  
   168  	// VethPair is a tuple of Veth that are paired
   169  	VethPair = "vethPair"
   170  
   171  	// NetNSName is a name of a network namespace
   172  	NetNSName = "netNSName"
   173  
   174  	// SHA is a sha of something
   175  	SHA = "sha"
   176  
   177  	// ServiceName is the orchestration framework name for a service
   178  	ServiceName = "serviceName"
   179  
   180  	// ServiceNamespace is the orchestration framework name for a service namespace.
   181  	ServiceNamespace = "serviceNamespace"
   182  
   183  	// ClusterName is the name of the cluster
   184  	ClusterName = "clusterName"
   185  
   186  	// ServiceID is the orchestration unique ID of a service
   187  	ServiceID = "serviceID"
   188  
   189  	// ServiceIP is the IP of the service
   190  	ServiceIP = "serviceIP"
   191  
   192  	// ServiceKey is the key of the service in a BPF map
   193  	ServiceKey = "svcKey"
   194  
   195  	// ServiceValue is the value of the service in a BPF map
   196  	ServiceValue = "svcVal"
   197  
   198  	// BackendIDs is the map of backend IDs (lbmap) indexed by backend address
   199  	BackendIDs = "backendIDs"
   200  
   201  	// BackendID is the ID of the backend
   202  	BackendID = "backendID"
   203  
   204  	// BackendName is the name of the backend
   205  	BackendName = "backendName"
   206  
   207  	// SlaveSlot is the slot number in a service BPF map
   208  	SlaveSlot = "slaveSlot"
   209  
   210  	// CiliumNetworkPolicy is a cilium specific NetworkPolicy
   211  	CiliumNetworkPolicy = "ciliumNetworkPolicy"
   212  
   213  	// CiliumNetworkPolicyName is the name of a CiliumNetworkPolicy
   214  	CiliumNetworkPolicyName = "ciliumNetworkPolicyName"
   215  
   216  	// BPFMapKey is a key from a BPF map
   217  	BPFMapKey = "bpfMapKey"
   218  
   219  	// BPFMapValue is a value from a BPF map
   220  	BPFMapValue = "bpfMapValue"
   221  
   222  	// XDPDevice is the device name
   223  	XDPDevice = "xdpDevice"
   224  
   225  	// Device is the device name
   226  	Device = "device"
   227  
   228  	// IpvlanMasterDevice is the ipvlan master device name
   229  	IpvlanMasterDevice = "ipvlanMasterDevice"
   230  
   231  	// DatapathMode is the datapath mode name
   232  	DatapathMode = "datapathMode"
   233  
   234  	// Tunnel is the tunnel name
   235  	Tunnel = "tunnel"
   236  
   237  	// Selector is a selector of any sort: endpoint, CIDR, toFQDNs
   238  	Selector = "Selector"
   239  
   240  	// EndpointLabelSelector is a selector for Endpoints by label
   241  	EndpointLabelSelector = "EndpointLabelSelector"
   242  
   243  	// EndpointSelector is a selector for Endpoints
   244  	EndpointSelector = "EndpointSelector"
   245  
   246  	// Path is a filesystem path. It can be a file or directory.
   247  	// Note: pkg/proxy/accesslog points to this variable so be careful when
   248  	// changing the value
   249  	Path = "file-path"
   250  
   251  	// Line is a line number within a file
   252  	Line = "line"
   253  
   254  	// Object is used when "%+v" printing Go objects for debug or error handling.
   255  	// It is often paired with logfields.Repr to render the object.
   256  	Object = "obj"
   257  
   258  	// Request is a request object received by us, reported in debug or error.
   259  	// It is often paired with logfields.Repr to render the object.
   260  	Request = "req"
   261  
   262  	// Params are the parameters of a request, reported in debug or error.
   263  	Params = "params"
   264  
   265  	// Response is a response object received by us, reported in debug or error.
   266  	// It is often paired with logfields.Repr to render the object.
   267  	Response = "resp"
   268  
   269  	// Route is a L2 or L3 Linux route
   270  	Route = "route"
   271  
   272  	// RetryUUID is an UUID identical for all retries of a set
   273  	RetryUUID = "retryUUID"
   274  
   275  	// Envoy xDS-protocol-specific
   276  
   277  	// XDSStreamID is the ID of an xDS request stream.
   278  	XDSStreamID = "xdsStreamID"
   279  
   280  	// XDSAckedVersion is the version of an xDS resource acked by Envoy.
   281  	XDSAckedVersion = "xdsAckedVersion"
   282  
   283  	// XDSCachedVersion is the version of an xDS resource currently in cache.
   284  	XDSCachedVersion = "xdsCachedVersion"
   285  
   286  	// XDSTypeURL is the URL that identifies an xDS resource type.
   287  	XDSTypeURL = "xdsTypeURL"
   288  
   289  	// XDSNonce is a nonce sent in xDS requests and responses.
   290  	XDSNonce = "xdsNonce"
   291  
   292  	// XDSCanary is a boolean indicating whether a response is a dry run.
   293  	XDSCanary = "xdsCanary"
   294  
   295  	// XDSResourceName is the name of an xDS resource.
   296  	XDSResourceName = "xdsResourceName"
   297  
   298  	// XDSClientNode is the ID of an XDS client, e.g. an Envoy node.
   299  	XDSClientNode = "xdsClientNode"
   300  
   301  	// XDSResource is an xDS resource message.
   302  	XDSResource = "xdsResource"
   303  
   304  	// XDSDetail is detail string included in XDS NACKs.
   305  	XDSDetail = "xdsDetail"
   306  
   307  	// K8s-specific
   308  
   309  	// K8sNodeID is the k8s ID of a K8sNode
   310  	K8sNodeID = "k8sNodeID"
   311  
   312  	// K8sPodName is the name of a k8s pod
   313  	K8sPodName = "k8sPodName"
   314  
   315  	// K8sSvcName is the name of a K8s service
   316  	K8sSvcName = "k8sSvcName"
   317  
   318  	// K8sSvcType is the k8s service type (e.g. NodePort, Loadbalancer etc.)
   319  	K8sSvcType = "k8sSvcType"
   320  
   321  	// K8sEndpointName is the k8s name for a k8s Endpoint (not a cilium Endpoint)
   322  	K8sEndpointName = "k8sEndpointName"
   323  
   324  	// K8sNamespace is the namespace something belongs to
   325  	K8sNamespace = "k8sNamespace"
   326  
   327  	// K8sIdentityAnnotation is a k8s non-identifying annotations on k8s objects
   328  	K8sIdentityAnnotation = "k8sIdentityAnnotation"
   329  
   330  	// K8sNetworkPolicy is a k8s NetworkPolicy object (not a CiliumNetworkObject, above).
   331  	K8sNetworkPolicy = "k8sNetworkPolicy"
   332  
   333  	// K8sNetworkPolicyName is the name of a K8sPolicyObject
   334  	K8sNetworkPolicyName = "k8sNetworkPolicyName"
   335  
   336  	// K8sIngress is a k8s Ingress service object
   337  	K8sIngress = "k8sIngress"
   338  
   339  	// K8sIngressName is the name of a K8sIngress
   340  	K8sIngressName = "k8sIngressName"
   341  
   342  	// K8sAPIVersion is the version of the k8s API an object has
   343  	K8sAPIVersion = "k8sApiVersion"
   344  
   345  	// Attempt is the attempt number if an operation is attempted multiple times
   346  	Attempt = "attempt"
   347  
   348  	// TrafficDirection represents the directionality of traffic with respect
   349  	// to an endpoint.
   350  	TrafficDirection = "trafficDirection"
   351  
   352  	// Modification represents a type of state change operation (insert, delete,
   353  	// upsert, etc.).
   354  	Modification = "modification"
   355  
   356  	// BPFMapName is the name of a BPF map.
   357  	BPFMapName = "bpfMapName"
   358  
   359  	// BPFHeaderHash is the hash of the BPF header.
   360  	BPFHeaderfileHash = "bpfHeaderfileHash"
   361  
   362  	// BPFMapPath is the path of a BPF map in the filesystem.
   363  	BPFMapPath = "bpfMapPath"
   364  
   365  	// BPFMapFD is the file descriptor for a BPF map.
   366  	BPFMapFD = "bpfMapFileDescriptor"
   367  
   368  	// ThreadID is the Envoy thread ID.
   369  	ThreadID = "threadID"
   370  
   371  	// Reason is a human readable string describing why an operation was
   372  	// performed
   373  	Reason = "reason"
   374  
   375  	// Debug is a boolean value for whether debug is set or not.
   376  	Debug = "debug"
   377  
   378  	// PID is an integer value for the process identifier of a process.
   379  	PID = "pid"
   380  
   381  	// PIDFile is a string value for the path to a file containing a PID.
   382  	PIDFile = "pidfile"
   383  
   384  	// Probe is the name of a status probe.
   385  	Probe = "probe"
   386  
   387  	// Key is the identity of the encryption key
   388  	Key = "key"
   389  )