Skip to content

Commit

Permalink
chore: wip fixing build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiz Henrique Pegoraro committed Jan 29, 2024
1 parent 166704c commit f7377e9
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 8 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
- name: Debug built version
run: ./cmd/otelcol-orb-agent/dist/otelcol-orb --version
- name: Build Otelcol Orb Agent Docker
run: make docker-otelcol-orb-agent
run: |
cd cmd/otelcol-orb-agent
docker build -t otelcol-orb-agent .
build-otelcol-orb-maestro:
runs-on: ubuntu-latest
Expand All @@ -45,4 +47,6 @@ jobs:
- name: Debug built version
run: ./cmd/otelcol-orb-maestro/dist/otelcol-orb --version
- name: Build Otelcol Orb Maestro Docker
run: make docker-otelcol-orb-maestro
run: |
cd cmd/otelcol-orb-maestro
docker build -t otelcol-orb-maestro .
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ endif

.PHONY: docker-otelcolagent
docker-otelcolagent:
docker build -t otelcol-orb-agent ./cmd/otelcol-orb-agent/
cd cmd/otelcol-orb-agent && docker build -t otelcol-orb-agent:develop .

.PHONY: docker-otelcolmaestro
docker-otelcolmaestro:
docker build -t otelcol-orb-maestro ./cmd/otelcol-orb-maestro/
cd cmd/otelcol-orb-maestro && docker build -t otelcol-orb-maestro:develop .

.PHONY: generate
generate: install-tools
Expand Down
2 changes: 2 additions & 0 deletions cmd/otelcol-orb-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ RUN apk --update add ca-certificates git tzdata

WORKDIR /build

COPY ../../receiver /build/receivers

RUN go install go.opentelemetry.io/collector/cmd/builder@latest
COPY builder-config.yaml .
RUN builder --config=builder-config.yaml
Expand Down
2 changes: 1 addition & 1 deletion cmd/otelcol-orb-agent/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exporters:

receivers:
# Custom
- gomod: github.com/orb-community/otelcol-orb/receiver/httpmetricsreceiver v0.87.0
- gomod: github.com/orb-community/otelcol-orb/receiver/httpmetricsreceiver v0.92.0
# Upstream
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.93.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.93.0
Expand Down
35 changes: 35 additions & 0 deletions cmd/otelcol-orb-agent/example-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
receivers:
httpmetrics:
targets:
- endpoint: https://demo.netbox.dev/
method: GET
follow_redirect: true
fail_if_not_ssl: true
contains_text: ["home", "0.0.1", "logo"]
tags: { "env": "prod", "customer": "acme" }
- endpoint: https://demo.netbox.dev/login
method: GET
follow_redirect: false
fail_if_not_ssl: true
contains_text: [ "login", "0.0.1", "logo" ]
tags: { "env": "prod", "customer": "acme" }
collection_interval: 60s
journald:
directory: /run/log/journal
units:
- ssh
- openvpn
- docker
- plymouth-log
priority: info
extensions:
exporters:

service:
pipelines:
metrics:
exporters:
- logging
receivers:
- httpcheck
35 changes: 35 additions & 0 deletions cmd/otelcol-orb-maestro/example-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
receivers:
httpmetrics:
targets:
- endpoint: https://demo.netbox.dev/
method: GET
follow_redirect: true
fail_if_not_ssl: true
contains_text: ["home", "0.0.1", "logo"]
tags: { "env": "prod", "customer": "acme" }
- endpoint: https://demo.netbox.dev/login
method: GET
follow_redirect: false
fail_if_not_ssl: true
contains_text: [ "login", "0.0.1", "logo" ]
tags: { "env": "prod", "customer": "acme" }
collection_interval: 60s
journald:
directory: /run/log/journal
units:
- ssh
- openvpn
- docker
- plymouth-log
priority: info
extensions:
exporters:

service:
pipelines:
metrics:
exporters:
- logging
receivers:
- httpcheck
6 changes: 3 additions & 3 deletions receiver/httpmetricsreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.20

require (
github.com/google/go-cmp v0.6.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.91.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.91.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.93.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.93.0
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/collector/component v0.93.0
go.opentelemetry.io/collector/config/confighttp v0.93.0
Expand Down Expand Up @@ -41,7 +41,7 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.91.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.93.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rs/cors v1.10.1 // indirect
go.opencensus.io v0.24.0 // indirect
Expand Down
3 changes: 3 additions & 0 deletions receiver/httpmetricsreceiver/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.91.0 h1:Mx/Xyxfeqr0dm8M9XL6lM5jZN3sp+5PUGZBR6QUJbyA=
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.91.0/go.mod h1:JuAibPtRgW2nNPJ3kTBsZIKtriAfa8Dh3yrlPHVvuMM=
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.93.0 h1:sQ2+pQ1vkZil4CpsjdzSwetleNKMgLoO1uAXwwbbZSY=
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.93.0/go.mod h1:hn5eC3vatwBMZXQLNc9lzZ8vxTXjVpJ3DjyUu9M2CiM=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
Expand All @@ -115,6 +117,7 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/collector v0.91.0 h1:C7sGUJDJ5nwm+CkWpAaVP3lNsuYpwSRbkmLncFjkmO8=
go.opentelemetry.io/collector v0.91.0/go.mod h1:YhQpIDZsn+bICAAqgBwXk9wqK8GKZDv+aogfG52zUuE=
go.opentelemetry.io/collector v0.93.0 h1:wnyNd3OjwD7wmTIEVvyZG9cS+dhmfLAhNutWDgE5Vqo=
go.opentelemetry.io/collector v0.93.0/go.mod h1:lorK6TQaQvg0RDRN42HwY0Gqc/d7mvBgCMeJCYGishA=
go.opentelemetry.io/collector/component v0.91.0 h1:aBT1i2zGyfh9PalYJLfXVvQp+osHyalwyDFselI1CtA=
go.opentelemetry.io/collector/component v0.91.0/go.mod h1:2KBHvjNFdU7oOjsObQeC4Ta2Ef607OISU5obznW00fw=
Expand Down

0 comments on commit f7377e9

Please sign in to comment.