knative.dev/pkg@v0.0.0-20260602142205-ac97e43f6622/logging/logkey/constants.go (about) 1 /* 2 Copyright 2018 The Knative Authors 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package logkey 18 19 const ( 20 // ControllerType is the key used for controller type in structured logs 21 ControllerType = "knative.dev/controller" 22 23 // Key is the key (namespace/name) being reconciled. 24 Key = "knative.dev/key" 25 26 // TraceID is the key used to track an asynchronous or long running operation. 27 TraceID = "knative.dev/traceid" 28 29 // Namespace is the key used for namespace in structured logs 30 Namespace = "knative.dev/namespace" 31 32 // JSONConfig is the key used for JSON configurations (not to be confused by the Configuration object) 33 JSONConfig = "knative.dev/jsonconfig" 34 35 // Kind is the key used to represent kind of an object in logs 36 Kind = "knative.dev/kind" 37 38 // Name is the key used to represent name of an object in logs 39 Name = "knative.dev/name" 40 41 // Operation is the key used to represent an operation in logs 42 Operation = "knative.dev/operation" 43 44 // Resource is the key used to represent a resource in logs 45 Resource = "knative.dev/resource" 46 47 // SubResource is a generic key used to represent a sub-resource in logs 48 SubResource = "knative.dev/subresource" 49 50 // UserInfo is the key used to represent a user information in logs 51 UserInfo = "knative.dev/userinfo" 52 53 // Pod is the key used to represent a pod's name in logs 54 Pod = "knative.dev/pod" 55 56 // Deployment is the key used to represent a deployment's name in logs 57 Deployment = "knative.dev/deployment" 58 59 // KubernetesService is the key used to represent a Kubernetes service name in logs 60 KubernetesService = "knative.dev/k8sservice" 61 62 // Commit is the logging key used to represent the VCS revision that the 63 // Knative component was built from 64 Commit = "commit" 65 )