Skip to content

Commit

Permalink
Add opentelemetry-collector-builder with Makefile and Github Action t…
Browse files Browse the repository at this point in the history
…o build on PR
  • Loading branch information
pmalek committed Apr 14, 2021
1 parent 415d1a7 commit b3861db
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/opentelemetry-collector-builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: OpenTelemetry Collector Builder

on:
pull_request:
branches:
- main

jobs:
otelcolbuilder:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.16', '1.15', '1.14' ]
steps:
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
working-directory: ./otelcolbuilder/
run: make build
1 change: 1 addition & 0 deletions otelcolbuilder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd/
28 changes: 28 additions & 0 deletions otelcolbuilder/.otelcol-builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
dist:
name: otelcol-sumo
description: Sumo Logic OpenTelemetry Collector distribution

# the module name for the new distribution, following Go mod conventions. Optional, but recommended.
module: github.com/SumoLogic/opentelemetry-collector-builder

otelcol_version: 0.24.0 # the OpenTelemetry Collector version to use as base for the distribution.
output_path: ./cmd/ # the path to write the output (sources and binary).

processors:
- gomod: "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cascadingfilterprocessor v0.24.0"
- gomod: "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sprocessor v0.24.0"
- gomod: "github.com/open-telemetry/opentelemetry-collector-contrib/processor/sourceprocessor v0.24.0"

exporters:
- gomod: "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.24.0"

# Replacement paths are relative to the output_path (location of source files)
replaces:
- github.com/open-telemetry/opentelemetry-collector-contrib/processor/cascadingfilterprocessor => ./../../processor/cascadingfilterprocessor

- github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sprocessor => ./../../processor/k8sprocessor
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig => ./../../internal/k8sconfig

- github.com/open-telemetry/opentelemetry-collector-contrib/processor/sourceprocessor => ./../../processor/sourceprocessor

- go.opentelemetry.io/collector => github.com/SumoLogic/opentelemetry-collector v0.24.0-sumo
5 changes: 5 additions & 0 deletions otelcolbuilder/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
install:
go install github.com/open-telemetry/[email protected]

build: install
opentelemetry-collector-builder --config .otelcol-builder.yaml

0 comments on commit b3861db

Please sign in to comment.