-
Notifications
You must be signed in to change notification settings - Fork 676
feat: Add unexposed otel engine and extension to codebase and change build structure #5114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 43 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
67a31d9
Add basic OTel engine
blewis12 5a397ac
Add basic Alloy Extension
blewis12 1ec6c56
Add collector and extension to dependency-replacements.yaml and re-bu…
blewis12 c809177
Add generate-module-dependencies to generate and .PHONY makefile blocks
blewis12 b9e92c9
Copy extension test from upstream PoC
blewis12 0acfafd
Renaming based on what was agreed on in design discussion
blewis12 dd8407f
Update versioning, clean makefile up a bit, and have generate-module-…
blewis12 a2568cc
Since our flowcmd is now in it's own package, move .release-please-ma…
blewis12 0363d79
Comment out otel sub command for now, and rename template
blewis12 99013a6
WIP: dependency issues with prometheusremotewriteexporter
blewis12 adf6bb7
Don't compile distro on CI
blewis12 9a17af0
Update distribution version to be in-sync with Alloy version
blewis12 78b7c51
Move release please manifest back to route and manually read instead …
blewis12 bc8aaf9
Re-build after rebase from main
blewis12 2028e98
PR feedback https://github.com/grafana/alloy/pull/5114#discussion_r26…
blewis12 9e307aa
Use require.eventually in extension_test.go
blewis12 b1137c6
Only include generated content warning in main_alloy.go and not main_…
blewis12 7ff7e17
PR Feedback https://github.com/grafana/alloy/pull/5114/#discussion_r2…
blewis12 7aad5a6
Move fallback_version.go and test to root directory, under alloy package
blewis12 cb499a6
Automate syncing version of OTel Engine with Default Engine
blewis12 3f35141
Implement retry with backoff in extension
blewis12 c28df01
Add basic readme for alloy engine extension
blewis12 4f665cf
run make generate-module-dependencies after rebase from main
blewis12 eb7ef6c
Point to fork of exporter/prometheusremotewriteexporter
blewis12 8f2e3dd
Use correct semantics in messaging output and hide instead of comment…
blewis12 ef94d0e
Merge branch 'main' into basic-otel-engine-and-extension-poc
blewis12 4988ba5
run go mod tidy/generate after merge
blewis12 4f2b320
Merge branch 'main' into basic-otel-engine-and-extension-poc
blewis12 9b885a0
rerun dependency gen
blewis12 3e33f92
Lint fixes
blewis12 cda280b
Ignore generated files
blewis12 3b501a8
Build changes: automatically install builder, and build Alloy in CI
blewis12 f9bad17
Add back generated files
blewis12 7a3e27c
Use go run instead of downloading the OCB builder as part of script
blewis12 cba4b0d
Add GA to check output of generate-otel-collector-distro
blewis12 4e94041
Fix the failing GA by committing the output of the generate command
blewis12 b1620eb
Update dependency to fork
blewis12 30fd69c
Refactor the config type in alloyengine extension
blewis12 de44972
Use grafana fork for prometheusremotewrite exporter instead of personal
blewis12 e719416
Remove accidental debug line
blewis12 6ac8095
Implement slightly flattened config types
blewis12 ffbf4b5
Fix/simplify the generated-collector GA
blewis12 b978015
Add comment regarding clearing GOOS/GOARCH
blewis12 166f4d4
Use alloy specific stability levels for the alloyengine
blewis12 456c660
Add a README containing information on how the project is built in th…
blewis12 285ab20
Merge branch 'main' into basic-otel-engine-and-extension-poc
blewis12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
.github/workflows/check-generate-otel-collector-distro.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Check generate-otel-collector-distro | ||
| permissions: | ||
| contents: read | ||
| on: pull_request | ||
|
|
||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 | ||
| with: | ||
| go-version-file: go.mod | ||
| cache: false | ||
|
|
||
| - name: Run generate-otel-collector-distro | ||
| run: | | ||
| make generate-otel-collector-distro | ||
|
|
||
| - name: Check for generated file changes | ||
| run: | | ||
| # List changed files in the collector directory (excluding generator source files) | ||
| if [ -n "$(git status --porcelain -- collector/)" ]; then | ||
| echo "Error: generated collector files are out of sync with generate-otel-collector-distro." | ||
| echo " Run: make generate-otel-collector-distro and commit the generated files" | ||
| git status -- collector/ | ||
| git diff -- collector/ | ||
| exit 1 | ||
| fi | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| dist: | ||
| module: github.com/grafana/alloy/otel_engine | ||
| name: alloy | ||
| description: Alloy OTel Collector distribution. | ||
| version: v1.12.1 # x-release-please-version | ||
| output_path: . | ||
|
|
||
| extensions: | ||
| - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.139.0 | ||
| - gomod: github.com/grafana/alloy/extension/alloyengine v0.1.0 | ||
|
|
||
| exporters: | ||
| - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.139.0 | ||
| - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.139.0 | ||
| - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.139.0 | ||
| - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.139.0 | ||
|
|
||
| processors: | ||
| - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.139.0 | ||
| - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.139.0 | ||
| - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.139.0 | ||
|
|
||
| receivers: | ||
| - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.139.0 | ||
|
|
||
| connectors: | ||
| - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.139.0 | ||
|
|
||
| providers: | ||
| - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.45.0 | ||
| - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.45.0 | ||
| - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v1.45.0 | ||
| - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.45.0 | ||
| - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.45.0 | ||
|
|
||
| replaces: | ||
| # Local modules. | ||
| - github.com/grafana/alloy => ../ | ||
| - github.com/grafana/alloy/syntax => ../syntax | ||
| - github.com/grafana/alloy/extension/alloyengine => ../extension/alloyengine | ||
| # BEGIN GENERATED REPLACES - DO NOT EDIT MANUALLY | ||
| # TODO: remove this replace directive once the upstream issue is fixed: https://github.com/prometheus/prometheus/issues/13842 | ||
| - go.opentelemetry.io/collector/featuregate => github.com/grafana/opentelemetry-collector/featuregate v0.0.0-20240325174506-2fd1623b2ca0 | ||
| # Replace yaml.v2 with fork | ||
| - gopkg.in/yaml.v2 => github.com/rfratto/go-yaml v0.0.0-20211119180816-77389c3526dc | ||
| # Replace directives from Loki — Azure SDK | ||
| - github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v68.0.0+incompatible | ||
| # Replace directives from Loki — Azure storage blob fork | ||
| - github.com/Azure/azure-storage-blob-go => github.com/MasslessParticle/azure-storage-blob-go v0.14.1-0.20240322194317-344980fda573 | ||
| # Use fork of gocql that has gokit logs and Prometheus metrics | ||
| - github.com/gocql/gocql => github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85 | ||
| # Insist on the optimised version of grafana/regexp | ||
| - github.com/grafana/regexp => github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc | ||
| # Replace memberlist with Grafana fork which includes unmerged upstream fixes | ||
| - github.com/hashicorp/memberlist => github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe | ||
| # Use forked syslog implementation by leodido for continued support | ||
| - github.com/influxdata/go-syslog/v3 => github.com/leodido/go-syslog/v4 v4.3.0 | ||
| # Replace thanos-io/objstore with Grafana fork | ||
| - github.com/thanos-io/objstore => github.com/grafana/objstore v0.0.0-20250210100727-533688b5600d | ||
| # TODO - remove forks when changes are merged upstream — non-singleton cadvisor | ||
| - github.com/google/cadvisor => github.com/grafana/cadvisor v0.0.0-20240729082359-1f04a91701e2 | ||
| # TODO - track exporter-package-v0.18.1 branch of grafana fork; remove once merged upstream | ||
| - github.com/prometheus-community/postgres_exporter => github.com/grafana/postgres_exporter v0.0.0-20250930111128-c8f6a9f4d363 | ||
| # TODO - remove once PR is merged upstream - https://github.com/prometheus/mysqld_exporter/pull/774 | ||
| - github.com/prometheus/mysqld_exporter => github.com/grafana/mysqld_exporter v0.17.2-0.20250226152553-be612e3fdedd | ||
| # TODO: replace node_exporter with custom fork for multi usage. https://github.com/prometheus/node_exporter/pull/2812 | ||
| - github.com/prometheus/node_exporter => github.com/grafana/node_exporter v0.18.1-grafana-r01.0.20251024135609-318b01780c89 | ||
| # Use Grafana fork of smimesign | ||
| - github.com/github/smimesign => github.com/grafana/smimesign v0.2.1-0.20220408144937-2a5adf3481d3 | ||
| # Replace OpenTelemetry OBI with Grafana fork | ||
| - go.opentelemetry.io/obi => github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.13 | ||
| # Replace OpenTelemetry eBPF profiler with Grafana fork | ||
| - go.opentelemetry.io/ebpf-profiler => github.com/grafana/opentelemetry-ebpf-profiler v0.0.202550-0.20251216083346-f910fc4db23e | ||
| # Update openshift/client-go to version compatible with structured-merge-diff v6 | ||
| - github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 | ||
| # Do not remove until bug in walqueue backwards compatibility is resolved: https://github.com/deneonet/benc/issues/13 | ||
| - github.com/deneonet/benc => github.com/deneonet/benc v1.1.7 | ||
| # Pin runc to v1.2.8 for compatibility with cadvisor requiring libcontainer/cgroups packages | ||
| - github.com/opencontainers/runc => github.com/opencontainers/runc v1.2.8 | ||
| # Replace controller-runtime with pinned version | ||
| - sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.20.4 | ||
| # Point to fork that uses prometheus v0.308.0, changes here are mostly related to type name updates. This can be removed once the upstream dependency points to prometheus v0.308.0 and above | ||
| - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter => github.com/grafana/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.0.0-20260108134526-9817e6c361c9 | ||
| # END GENERATED REPLACES |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package main | ||
|
|
||
| //go:generate go run go.opentelemetry.io/collector/cmd/builder@${BUILDER_VERSION} --config ./builder-config.yaml --skip-compilation | ||
| //go:generate go mod tidy | ||
| //go:generate go run ./generator/generator.go --main-path ./main.go --main-alloy-path ./main_alloy.go |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.