Skip to content

Commit 1931cea

Browse files
upgrade to latest dependencies
bumping knative.dev/networking 5e69dbb...0e1a0aa: > 0e1a0aa upgrade to latest dependencies (# 1086) bumping knative.dev/pkg 72b164e...a624c75: > a624c75 create a knative semconv package to simplify otel dep bumps (# 3269) Signed-off-by: Knative Automation <[email protected]>
1 parent 95c79f5 commit 1931cea

File tree

7 files changed

+117
-11
lines changed

7 files changed

+117
-11
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ require (
1313
k8s.io/apimachinery v0.33.5
1414
k8s.io/client-go v0.33.5
1515
knative.dev/hack v0.0.0-20250902153942-1499de21e119
16-
knative.dev/networking v0.0.0-20251007015313-5e69dbb20593
17-
knative.dev/pkg v0.0.0-20251007132912-72b164e68f86
16+
knative.dev/networking v0.0.0-20251008015313-0e1a0aa62ad1
17+
knative.dev/pkg v0.0.0-20251007184713-a624c759bede
1818
sigs.k8s.io/yaml v1.6.0
1919
)
2020

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,10 @@ k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJ
268268
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
269269
knative.dev/hack v0.0.0-20250902153942-1499de21e119 h1:NbQvjnFK1tL489LN0qAybWy0E17Jpziwcv/XIHwfp6M=
270270
knative.dev/hack v0.0.0-20250902153942-1499de21e119/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
271-
knative.dev/networking v0.0.0-20251007015313-5e69dbb20593 h1:Jjsz+IMCXsDB9qOyBNp6SWHTmz3+SJou65Cf0Rs96B0=
272-
knative.dev/networking v0.0.0-20251007015313-5e69dbb20593/go.mod h1:HMfGoXTbo27P2OckQipJvaJSUWMe4Vdt4tzDCfHkHuQ=
273-
knative.dev/pkg v0.0.0-20251007132912-72b164e68f86 h1:ez6Q3QIqKs9r4fKkEGlwsOAqxvhP9OlEAyy5ObMpePM=
274-
knative.dev/pkg v0.0.0-20251007132912-72b164e68f86/go.mod h1:pNETfvzYq5MmPTi+XGGIjjgvQSYvu4pxxLF1muKunhs=
271+
knative.dev/networking v0.0.0-20251008015313-0e1a0aa62ad1 h1:mmUlK6ogxaY1EEFHUY1A5It4RpZbenYtLs5RymaC0lg=
272+
knative.dev/networking v0.0.0-20251008015313-0e1a0aa62ad1/go.mod h1:VoeeRbQKTTnHZ5eNQ0hAMPBs/O12v++DPNmbPfKkErE=
273+
knative.dev/pkg v0.0.0-20251007184713-a624c759bede h1:ADQEXMQlfbjBjicJdou8R5WjPHm0/5FyyV58RQ9eYPU=
274+
knative.dev/pkg v0.0.0-20251007184713-a624c759bede/go.mod h1:pNETfvzYq5MmPTi+XGGIjjgvQSYvu4pxxLF1muKunhs=
275275
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
276276
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
277277
sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=

vendor/knative.dev/pkg/observability/metrics/k8s/tools.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ import (
2323
"strings"
2424
"time"
2525

26+
"knative.dev/pkg/observability/semconv"
27+
"knative.dev/pkg/observability/semconv/httpconv"
28+
2629
"go.opentelemetry.io/otel"
2730
"go.opentelemetry.io/otel/attribute"
2831
"go.opentelemetry.io/otel/metric"
29-
semconv "go.opentelemetry.io/otel/semconv/v1.37.0"
30-
"go.opentelemetry.io/otel/semconv/v1.37.0/httpconv"
3132
"k8s.io/client-go/tools/metrics"
3233
)
3334

vendor/knative.dev/pkg/observability/resource/default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import (
2020
"os"
2121

2222
"knative.dev/pkg/changeset"
23+
"knative.dev/pkg/observability/semconv"
2324
"knative.dev/pkg/system"
2425

2526
"go.opentelemetry.io/otel/attribute"
2627
"go.opentelemetry.io/otel/sdk/resource"
27-
semconv "go.opentelemetry.io/otel/semconv/v1.37.0"
2828
)
2929

3030
const otelServiceNameKey = "OTEL_SERVICE_NAME"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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 httpconv
18+
19+
import (
20+
"go.opentelemetry.io/otel/metric"
21+
"go.opentelemetry.io/otel/semconv/v1.37.0/httpconv"
22+
)
23+
24+
type (
25+
ClientRequestDuration = httpconv.ClientRequestDuration
26+
RequestMethodAttr = httpconv.RequestMethodAttr
27+
)
28+
29+
func NewClientRequestDuration(
30+
m metric.Meter,
31+
opt ...metric.Float64HistogramOption,
32+
) (httpconv.ClientRequestDuration, error) {
33+
return httpconv.NewClientRequestDuration(m, opt...)
34+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
}

vendor/modules.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ k8s.io/utils/trace
11021102
# knative.dev/hack v0.0.0-20250902153942-1499de21e119
11031103
## explicit; go 1.21
11041104
knative.dev/hack
1105-
# knative.dev/networking v0.0.0-20251007015313-5e69dbb20593
1105+
# knative.dev/networking v0.0.0-20251008015313-0e1a0aa62ad1
11061106
## explicit; go 1.24.0
11071107
knative.dev/networking/config
11081108
knative.dev/networking/pkg
@@ -1152,7 +1152,7 @@ knative.dev/networking/test/test_images/runtime/handlers
11521152
knative.dev/networking/test/test_images/timeout
11531153
knative.dev/networking/test/test_images/wsserver
11541154
knative.dev/networking/test/types
1155-
# knative.dev/pkg v0.0.0-20251007132912-72b164e68f86
1155+
# knative.dev/pkg v0.0.0-20251007184713-a624c759bede
11561156
## explicit; go 1.24.0
11571157
knative.dev/pkg/apis
11581158
knative.dev/pkg/apis/duck
@@ -1219,6 +1219,8 @@ knative.dev/pkg/observability/metrics/prometheus
12191219
knative.dev/pkg/observability/resource
12201220
knative.dev/pkg/observability/runtime
12211221
knative.dev/pkg/observability/runtime/k8s
1222+
knative.dev/pkg/observability/semconv
1223+
knative.dev/pkg/observability/semconv/httpconv
12221224
knative.dev/pkg/observability/tracing
12231225
knative.dev/pkg/ptr
12241226
knative.dev/pkg/reconciler

0 commit comments

Comments
 (0)