Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "submodules/opentelemetry-operations-collector"]
path = submodules/opentelemetry-operations-collector
url = ../../GoogleCloudPlatform/opentelemetry-operations-collector.git
14 changes: 4 additions & 10 deletions builds/otel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@ if [ -z "${GO_BIN}" ]; then
fi
ARCH=$($GO_BIN env GOARCH)

cd submodules/opentelemetry-operations-collector/otelopscol

BUILDARCH="$ARCH" \
TARGETARCH="$ARCH" \
GO_BIN="${GO_BIN}" \
COLLECTOR_LD_FLAGS="$LDFLAGS" \
COLLECTOR_BUILDVCS="false" \
COLLECTOR_BUILD_TAGS="gpu" \
make build
cp ./otelopscol "$DESTDIR/otelopscol"
cd cmd/otelopscol

"${GO_BIN}" build -buildvcs=false -tags="gpu" -ldflags="-s -w ${LDFLAGS}" -o "$DESTDIR/otelopscol" .

256 changes: 256 additions & 0 deletions cmd/otelopscol/components.go

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions cmd/otelopscol/generate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package main

//go:generate go run ../../internal/distrogen generate --spec spec.yaml --registry registry.yaml --force
567 changes: 567 additions & 0 deletions cmd/otelopscol/go.mod

Large diffs are not rendered by default.

1,559 changes: 1,559 additions & 0 deletions cmd/otelopscol/go.sum

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions cmd/otelopscol/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions cmd/otelopscol/main_others.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions cmd/otelopscol/main_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions cmd/otelopscol/registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2025 Google LLC
#
# 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.

receivers:
dcgm:
gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/dcgmreceiver v0.0.0
path: "../../internal/components/receiver/dcgmreceiver"
nvml:
gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/nvmlreceiver v0.0.0
path: "../../internal/components/receiver/nvmlreceiver"
saphana:
gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver

processors:
agentmetrics:
gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/agentmetricsprocessor v0.0.0
path: "../../internal/components/processor/agentmetricsprocessor"
normalizesums:
gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/normalizesumsprocessor v0.0.0
path: "../../internal/components/processor/normalizesumsprocessor"
filter:
gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/filterprocessor v0.0.0
path: "../../internal/components/processor/filterprocessor"
transform:
gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/transformprocessor v0.0.0
path: "../../internal/components/processor/transformprocessor"
72 changes: 72 additions & 0 deletions cmd/otelopscol/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: otelopscol
module: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/otelopscol
display_name: ""
description: OpenTelemetry Collector binary used by the Ops Agent
blurb: ""
build_container: debian
version: v0.151.0
opentelemetry_version: 0.151.0
opentelemetry_contrib_version: 0.151.0
opentelemetry_stable_version: 1.57.0
go_version: 1.26.1
binary_name: otelopscol
build_tags: gpu
boringcrypto: false
docker_repo: ""
components:
receivers:
- filelog
- fluentforward
- hostmetrics
- iis
- prometheus
- otlp
- syslog
- sqlserver
- sqlquery
- mysql
- windowseventlog
- windowsperfcounters
- journald
- otlpjsonfile
- dcgm
- nvml
processors:
- cumulativetodelta
- deltatocumulative
- deltatorate
- filter
- groupbyattrs
- interval
- metricstransform
- resourcedetection
- resource
- transform
- batch
- memorylimiter
- metricstarttime
- agentmetrics
- normalizesums
exporters:
- otlp
- otlphttp
- debug
extensions:
- zpages
- googleclientauth
- pprof
- filestorage
providers:
- googlesecretmanager
- file
- env
replaces:
- from: github.com/GoogleCloudPlatform/opentelemetry-operations-collector
to: ../../
reason: Reference root module of repository to find dependency packages.
- from: github.com/buger/jsonparser
to: github.com/buger/jsonparser v1.1.2
reason: Force update buger/jsonparser to v1.1.2 to fix vulnerability
collector_cgo: true
component_module_base: ""
distrogen_version: ""
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[27:18] "fields[operation]": 1:10: error: field "operation" not found
[26:13] "fields[operation]": 1:10: error: field "operation" not found
23 | processors:
24 | simple:
25 | type: modify_fields
26 | fields:
> 27 | operation:
^
> 26 | fields:
^
27 | operation:
28 | move_from: jsonPayload.operation
29 | service:
30 | experimental_otel_logging: true
31 |
29 | service:
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[27:18] "fields[operation]": 1:10: error: field "operation" not found
[26:13] "fields[operation]": 1:10: error: field "operation" not found
23 | processors:
24 | simple:
25 | type: modify_fields
26 | fields:
> 27 | operation:
^
> 26 | fields:
^
27 | operation:
28 | move_from: jsonPayload.operation
29 | service:
30 | experimental_otel_logging: true
31 |
29 | service:
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[27:18] "fields[operation]": 1:10: error: field "operation" not found
[26:13] "fields[operation]": 1:10: error: field "operation" not found
23 | processors:
24 | simple:
25 | type: modify_fields
26 | fields:
> 27 | operation:
^
> 26 | fields:
^
27 | operation:
28 | move_from: jsonPayload.operation
29 | service:
30 | experimental_otel_logging: true
31 |
29 | service:
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[27:18] "fields[operation]": 1:10: error: field "operation" not found
[26:13] "fields[operation]": 1:10: error: field "operation" not found
23 | processors:
24 | simple:
25 | type: modify_fields
26 | fields:
> 27 | operation:
^
> 26 | fields:
^
27 | operation:
28 | move_from: jsonPayload.operation
29 | service:
30 | experimental_otel_logging: true
31 |
29 | service:
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[24:21] "Pipelines[lib:pipeline_1]" must not start with "lib:"
[23:14] "Pipelines[lib:pipeline_1]" must not start with "lib:"
20 | - /var/log/messages
21 | - /var/log/syslog
22 | service:
23 | pipelines:
> 24 | lib:pipeline_1:
^
> 23 | pipelines:
^
24 | lib:pipeline_1:
25 | receivers: [syslog]
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[24:21] "Pipelines[lib:pipeline_1]" must not start with "lib:"
[23:14] "Pipelines[lib:pipeline_1]" must not start with "lib:"
20 | - /var/log/messages
21 | - /var/log/syslog
22 | service:
23 | pipelines:
> 24 | lib:pipeline_1:
^
> 23 | pipelines:
^
24 | lib:pipeline_1:
25 | receivers: [syslog]
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[24:21] "Pipelines[lib:pipeline_1]" must not start with "lib:"
[23:14] "Pipelines[lib:pipeline_1]" must not start with "lib:"
20 | - /var/log/messages
21 | - /var/log/syslog
22 | service:
23 | pipelines:
> 24 | lib:pipeline_1:
^
> 23 | pipelines:
^
24 | lib:pipeline_1:
25 | receivers: [syslog]
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[24:21] "Pipelines[lib:pipeline_1]" must not start with "lib:"
[23:14] "Pipelines[lib:pipeline_1]" must not start with "lib:"
20 | - /var/log/messages
21 | - /var/log/syslog
22 | service:
23 | pipelines:
> 24 | lib:pipeline_1:
^
> 23 | pipelines:
^
24 | lib:pipeline_1:
25 | receivers: [syslog]
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[19:18] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~"
[19:16] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~"
16 | processors:
17 | p1:
18 | type: exclude_logs
> 19 | match_any: ['jsonPayload.message!~foo']
^
^
20 | service:
21 | pipelines:
22 | default_pipeline:
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[19:18] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~"
[19:16] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~"
16 | processors:
17 | p1:
18 | type: exclude_logs
> 19 | match_any: ['jsonPayload.message!~foo']
^
^
20 | service:
21 | pipelines:
22 | default_pipeline:
Loading
Loading