|
| 1 | +/* |
| 2 | +Copyright 2022 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 semconv |
| 18 | + |
| 19 | +import ( |
| 20 | + "go.opentelemetry.io/otel/attribute" |
| 21 | + semconv "go.opentelemetry.io/otel/semconv/v1.37.0" |
| 22 | +) |
| 23 | + |
| 24 | +const ( |
| 25 | + SchemaURL = semconv.SchemaURL |
| 26 | + |
| 27 | + ServiceNameKey = semconv.ServiceNameKey |
| 28 | + |
| 29 | + ServerAddressKey = semconv.ServerAddressKey |
| 30 | + ServerPortKey = semconv.ServerPortKey |
| 31 | + |
| 32 | + HTTPRequestMethodKey = semconv.HTTPRequestMethodKey |
| 33 | + HTTPResponseStatusCodeKey = semconv.HTTPResponseStatusCodeKey |
| 34 | + |
| 35 | + URLSchemeKey = semconv.URLSchemeKey |
| 36 | + URLTemplateKey = semconv.URLTemplateKey |
| 37 | + |
| 38 | + K8SNamespaceNameKey = semconv.K8SNamespaceNameKey |
| 39 | + K8SPodNameKey = semconv.K8SPodNameKey |
| 40 | + K8SContainerNameKey = semconv.K8SContainerNameKey |
| 41 | +) |
| 42 | + |
| 43 | +func K8SContainerName(val string) attribute.KeyValue { |
| 44 | + return semconv.ContainerName(val) |
| 45 | +} |
| 46 | + |
| 47 | +func K8SPodName(val string) attribute.KeyValue { |
| 48 | + return semconv.K8SPodName(val) |
| 49 | +} |
| 50 | + |
| 51 | +func K8SNamespaceName(val string) attribute.KeyValue { |
| 52 | + return semconv.K8SNamespaceName(val) |
| 53 | +} |
| 54 | + |
| 55 | +func ServiceVersion(val string) attribute.KeyValue { |
| 56 | + return semconv.ServiceVersion(val) |
| 57 | +} |
| 58 | + |
| 59 | +func ServiceName(val string) attribute.KeyValue { |
| 60 | + return semconv.ServiceName(val) |
| 61 | +} |
| 62 | + |
| 63 | +func ServiceInstanceID(val string) attribute.KeyValue { |
| 64 | + return semconv.ServiceInstanceID(val) |
| 65 | +} |
| 66 | + |
| 67 | +func HTTPResponseStatusCode(val int) attribute.KeyValue { |
| 68 | + return semconv.HTTPResponseStatusCode(val) |
| 69 | +} |
0 commit comments