Skip to content
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

Building a custom collector #5259

Closed
vernonr3 opened this issue Sep 27, 2024 · 5 comments · Fixed by #5304
Closed

Building a custom collector #5259

vernonr3 opened this issue Sep 27, 2024 · 5 comments · Fixed by #5304
Labels

Comments

@vernonr3
Copy link

vernonr3 commented Sep 27, 2024

The build instructions for using ocb at version 110.0 don't work.

The builder-config.yaml is
dist:
name: otelcol-dev
module: github.com/open-telemetry/opentelemetry-collector
description: Basic OTel Collector distribution for Developers
output_path: ./otelcol-dev
otelcol_version: "0.110.0"
version: "0.0.1"

exporters:

  • gomod:

    NOTE: Prior to v0.86.0 use the loggingexporter instead of debugexporter.

    go.opentelemetry.io/collector/exporter/debugexporter v0.110.0
  • gomod:
    go.opentelemetry.io/collector/otlpexporter v0.110.0

processors:

  • gomod:
    go.opentelemetry.io/collector/processor/batchprocessor v0.110.0

receivers:

  • gomod:
    go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0

The response to:
./ocb_110 --config builder-config.yaml

is

2024-09-27T17:04:19.796+0100 INFO internal/command.go:125 OpenTelemetry Collector Builder {"version": "(devel)"}
2024-09-27T17:04:19.797+0100 INFO internal/command.go:161 Using config file {"path": "builder-config.yaml"}
2024-09-27T17:04:19.797+0100 INFO builder/config.go:142 Using go {"go-executable": "/snap/bin/go"}
2024-09-27T17:04:19.798+0100 INFO builder/main.go:101 Sources created {"path": "./otelcol-dev"}
Error: failed to update go.mod: go subcommand failed with args '[mod tidy -compat=1.22]': exit status 1, error message: go: downloading go.opentelemetry.io/collector/confmap/provider/fileprovider v0.110.0
go: downloading go.opentelemetry.io/collector/otlpexporter v0.110.0
go: downloading go.opentelemetry.io/collector/confmap/provider/envprovider v0.110.0
go: go.opentelemetry.io/collector/confmap/provider/envprovider@v0.110.0: reading go.opentelemetry.io/collector/confmap/provider/envprovider/go.mod at revision confmap/provider/envprovider/v0.110.0: unknown revision confmap/provider/envprovider/v0.110.0

Am I right in thinking there are versioning issues?

Thanks

@svrnm
Copy link
Member

svrnm commented Sep 27, 2024

@open-telemetry/collector-approvers PTAL

@tiffany76
Copy link
Contributor

Possibly related to open-telemetry/opentelemetry-collector-releases#665.

@mx-psi
Copy link
Member

mx-psi commented Oct 2, 2024

Hey, we are looking into a more hands-free approach but what we should do for now is add this to the manifest:

providers:
  - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.16.0
  - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.16.0
  - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.110.0
  - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.110.0
  - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.110.0

@tiffany76
Copy link
Contributor

Thanks, @mx-psi! To spell this out as clearly as possible, the solution is to add the providers block you've supplied to the end of the manifest, around line 167 of the Building a custom Collector page?

@mx-psi
Copy link
Member

mx-psi commented Oct 3, 2024

@tiffany76 Yes, that's it! Regardless of what approach we take, I think we should update the docs to have that

@tiffany76 tiffany76 added the good first issue Good for newcomers label Oct 3, 2024
RichardChukwu added a commit to RichardChukwu/opentelemetry.io that referenced this issue Oct 4, 2024
Update custom-collector.md issue number fixes open-telemetry#5259
RichardChukwu added a commit to RichardChukwu/opentelemetry.io that referenced this issue Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants