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