Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pipelines/azure-pipeline-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ variables:
IS_OTEL_UPGRADE_BRANCH: $[startsWith(variables['Build.SourceBranchName'], 'otelcollector-upgrade-')]
BUILD_WINDOWS: true
Codeql.Enabled: true
GOLANG_VERSION: '1.24.9'
GOLANG_VERSION: '1.24.11'
FLUENTBIT_GOLANG_VERSION: '1.24.6'
TESTKUBE_GOLANG_VERSION: '1.23.10'
FLUENT_BIT_VERSION: '3.2.2'
Expand Down
16 changes: 10 additions & 6 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file contains CVEs to be ignored by Trivy
# Auto-generated on Tue Oct 14 07:13:40 UTC 2025
# Auto-generated on Wed Dec 24 07:15:32 UTC 2025

# CRITICAL

Expand All @@ -8,17 +8,21 @@
CVE-2024-33599 #
CVE-2024-33601 #
CVE-2025-4802 #
# prometheus-collector
# otelcollector
CVE-2025-68156 # github.com/expr-lang/expr
# promconfigvalidator
CVE-2025-68156 # github.com/expr-lang/expr

# MEDIUM
# kube-state-metrics
CVE-2023-4527 #
CVE-2023-4806 #
CVE-2024-33600 #

# prometheus-collector # promconfigvalidator
CVE-2025-47914
CVE-2025-58181
CVE-2025-47914 #
CVE-2025-58181 #
# prometheusui
CVE-2025-47914 # golang.org/x/crypto
CVE-2025-58181 # golang.org/x/crypto

# LOW
# kube-state-metrics
Expand Down
2 changes: 1 addition & 1 deletion OPENTELEMETRY_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.136.0
v0.141.0
2 changes: 1 addition & 1 deletion TARGETALLOCATOR_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.136.0
v0.141.0
351 changes: 176 additions & 175 deletions otelcollector/opentelemetry-collector-builder/go.mod

Large diffs are not rendered by default.

800 changes: 400 additions & 400 deletions otelcollector/opentelemetry-collector-builder/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion otelcollector/opentelemetry-collector-builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func main() {
info := component.BuildInfo{
Command: "custom-collector-distro",
Description: "Custom OpenTelemetry Collector distribution",
Version: "0.136.0",
Version: "0.141.0",
}

set := otelcol.CollectorSettings{
Expand Down
16 changes: 8 additions & 8 deletions otelcollector/otel-allocator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,17 @@ require (
go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.uber.org/atomic v1.11.0
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.41.0 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
golang.org/x/mod v0.26.0 // indirect
golang.org/x/net v0.43.0 // indirect
golang.org/x/mod v0.29.0 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/term v0.34.0 // indirect
golang.org/x/text v0.28.0 // indirect
golang.org/x/sync v0.18.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/term v0.37.0 // indirect
golang.org/x/text v0.31.0 // indirect
golang.org/x/time v0.9.0 // indirect
golang.org/x/tools v0.35.0 // indirect
golang.org/x/tools v0.38.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/api v0.213.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect
Expand Down
32 changes: 16 additions & 16 deletions otelcollector/otel-allocator/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -557,14 +557,14 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 h1:yqrTHse8TCMW1M1ZCP+VAR/l0kKxwaAIqN/il7x4voA=
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand All @@ -575,8 +575,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -585,8 +585,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -614,26 +614,26 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4=
golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw=
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0=
golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw=
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,8 @@ func TestAllocationCollision(t *testing.T) {

cols := MakeNCollectors(3, 0)
allocator.SetCollectors(cols)
firstLabels := labels.Labels{
{Name: "test", Value: "test1"},
}
secondLabels := labels.Labels{
{Name: "test", Value: "test2"},
}
firstLabels := labels.New(labels.Label{Name: "test", Value: "test1"})
secondLabels := labels.New(labels.Label{Name: "test", Value: "test2"})
firstTarget := target.NewItem("sample-name", "0.0.0.0:8000", firstLabels, "")
secondTarget := target.NewItem("sample-name", "0.0.0.0:8000", secondLabels, "")

Expand Down
60 changes: 28 additions & 32 deletions otelcollector/otel-allocator/internal/allocation/per_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,22 @@ func TestAllocationPerNode(t *testing.T) {

cols := MakeNCollectors(4, 0)
s.SetCollectors(cols)
firstLabels := labels.Labels{
{Name: "test", Value: "test1"},
{Name: "__meta_kubernetes_pod_node_name", Value: "node-0"},
}
secondLabels := labels.Labels{
{Name: "test", Value: "test2"},
{Name: "__meta_kubernetes_node_name", Value: "node-1"},
}
firstLabels := labels.New(
labels.Label{Name: "test", Value: "test1"},
labels.Label{Name: "__meta_kubernetes_pod_node_name", Value: "node-0"},
)
secondLabels := labels.New(
labels.Label{Name: "test", Value: "test2"},
labels.Label{Name: "__meta_kubernetes_node_name", Value: "node-1"},
)
// no label, should be skipped
thirdLabels := labels.Labels{
{Name: "test", Value: "test3"},
}
thirdLabels := labels.New(labels.Label{Name: "test", Value: "test3"})
// endpointslice target kind and name
fourthLabels := labels.Labels{
{Name: "test", Value: "test4"},
{Name: "__meta_kubernetes_endpointslice_address_target_kind", Value: "Node"},
{Name: "__meta_kubernetes_endpointslice_address_target_name", Value: "node-3"},
}
fourthLabels := labels.New(
labels.Label{Name: "test", Value: "test4"},
labels.Label{Name: "__meta_kubernetes_endpointslice_address_target_kind", Value: "Node"},
labels.Label{Name: "__meta_kubernetes_endpointslice_address_target_name", Value: "node-3"},
)

firstTarget := target.NewItem("sample-name", "0.0.0.0:8000", firstLabels, "")
secondTarget := target.NewItem("sample-name", "0.0.0.0:8000", secondLabels, "")
Expand Down Expand Up @@ -99,24 +97,22 @@ func TestAllocationPerNodeUsingFallback(t *testing.T) {

cols := MakeNCollectors(4, 0)
s.SetCollectors(cols)
firstLabels := labels.Labels{
{Name: "test", Value: "test1"},
{Name: "__meta_kubernetes_pod_node_name", Value: "node-0"},
}
secondLabels := labels.Labels{
{Name: "test", Value: "test2"},
{Name: "__meta_kubernetes_node_name", Value: "node-1"},
}
firstLabels := labels.New(
labels.Label{Name: "test", Value: "test1"},
labels.Label{Name: "__meta_kubernetes_pod_node_name", Value: "node-0"},
)
secondLabels := labels.New(
labels.Label{Name: "test", Value: "test2"},
labels.Label{Name: "__meta_kubernetes_node_name", Value: "node-1"},
)
// no label, should be allocated by the fallback strategy
thirdLabels := labels.Labels{
{Name: "test", Value: "test3"},
}
thirdLabels := labels.New(labels.Label{Name: "test", Value: "test3"})
// endpointslice target kind and name
fourthLabels := labels.Labels{
{Name: "test", Value: "test4"},
{Name: "__meta_kubernetes_endpointslice_address_target_kind", Value: "Node"},
{Name: "__meta_kubernetes_endpointslice_address_target_name", Value: "node-3"},
}
fourthLabels := labels.New(
labels.Label{Name: "test", Value: "test4"},
labels.Label{Name: "__meta_kubernetes_endpointslice_address_target_kind", Value: "Node"},
labels.Label{Name: "__meta_kubernetes_endpointslice_address_target_name", Value: "node-3"},
)

firstTarget := target.NewItem("sample-name", "0.0.0.0:8000", firstLabels, "")
secondTarget := target.NewItem("sample-name", "0.0.0.0:8000", secondLabels, "")
Expand Down
18 changes: 9 additions & 9 deletions otelcollector/otel-allocator/internal/allocation/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ func MakeNNewTargets(n int, numCollectors int, startingIndex int) []*target.Item
toReturn := []*target.Item{}
for i := startingIndex; i < n+startingIndex; i++ {
collector := fmt.Sprintf("collector-%d", colIndex(i, numCollectors))
label := labels.Labels{
{Name: "i", Value: strconv.Itoa(i)},
{Name: "total", Value: strconv.Itoa(n + startingIndex)},
}
label := labels.New(
labels.Label{Name: "i", Value: strconv.Itoa(i)},
labels.Label{Name: "total", Value: strconv.Itoa(n + startingIndex)},
)
newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), fmt.Sprintf("test-url-%d", i), label, collector)
toReturn = append(toReturn, newTarget)
}
Expand All @@ -54,11 +54,11 @@ func MakeNCollectors(n int, startingIndex int) map[string]*Collector {
func MakeNNewTargetsWithEmptyCollectors(n int, startingIndex int) []*target.Item {
toReturn := []*target.Item{}
for i := startingIndex; i < n+startingIndex; i++ {
label := labels.Labels{
{Name: "i", Value: strconv.Itoa(i)},
{Name: "total", Value: strconv.Itoa(n + startingIndex)},
{Name: "__meta_kubernetes_pod_node_name", Value: "node-0"},
}
label := labels.New(
labels.Label{Name: "i", Value: strconv.Itoa(i)},
labels.Label{Name: "total", Value: strconv.Itoa(n + startingIndex)},
labels.Label{Name: "__meta_kubernetes_pod_node_name", Value: "node-0"},
)
newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), fmt.Sprintf("test-url-%d", i), label, "")
toReturn = append(toReturn, newTarget)
}
Expand Down
1 change: 1 addition & 0 deletions otelcollector/otel-allocator/internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ type PrometheusCRConfig struct {
ProbeNamespaceSelector *metav1.LabelSelector `yaml:"probe_namespace_selector,omitempty"`
ScrapeProtocols []monitoringv1.ScrapeProtocol `yaml:"scrape_protocols,omitempty"`
ScrapeInterval model.Duration `yaml:"scrape_interval,omitempty"`
EvaluationInterval model.Duration `yaml:"evaluation_interval,omitempty"`
}

type HTTPSServerConfig struct {
Expand Down
3 changes: 3 additions & 0 deletions otelcollector/otel-allocator/internal/config/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package config

import (
uberzap "go.uber.org/zap"
"flag"

"github.com/spf13/pflag"
Expand Down Expand Up @@ -40,6 +41,8 @@ func getFlagSet(errorHandling pflag.ErrorHandling) *pflag.FlagSet {
flagSet.String(httpsTLSKeyFilePathFlagName, "", "The path to the HTTPS server TLS key file.")
zapFlagSet := flag.NewFlagSet("", flag.ErrorHandling(errorHandling))
zapCmdLineOpts.BindFlags(zapFlagSet)
lvl := uberzap.NewAtomicLevelAt(uberzap.PanicLevel)
zapCmdLineOpts.Level = &lvl
flagSet.AddGoFlagSet(zapFlagSet)
return flagSet
}
Expand Down
2 changes: 1 addition & 1 deletion otelcollector/otel-allocator/internal/prehook/relabel.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (tf *relabelConfigTargetFilter) Apply(targets []*target.Item) []*target.Ite
}

if keepTarget {
targets[writeIndex] = tItem
targets[writeIndex] = target.NewItem(tItem.JobName, tItem.TargetURL, tItem.Labels, tItem.CollectorName, target.WithRelabeledLabels(lset))
writeIndex++
}
}
Expand Down
Loading
Loading