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

otlpreceiver with ocb v0.68.0 #6841

Closed
Gauravmeenu opened this issue Dec 21, 2022 · 5 comments
Closed

otlpreceiver with ocb v0.68.0 #6841

Gauravmeenu opened this issue Dec 21, 2022 · 5 comments
Labels
area:builder bug Something isn't working priority:p1 High

Comments

@Gauravmeenu
Copy link

Gauravmeenu commented Dec 21, 2022

Whenever I am compling and creating own collector instance with ocb v0.68.0 and mentioning otlpreceiver v0.68.0 in manifest.yaml file then ,
my terminal pop-up with the error like this

Error: failed to compile the OpenTelemetry Collector distribution: exit status 2. Output:

go.opentelemetry.io/collector/receiver/otlpreceiver/internal/logs

......\pkg\mod\go.opentelemetry.io\collector\receiver\otlpreceiver@v0.64.1\internal\logs\otlp.go:41:22: undefined: obsreport.MustNewReceiver

go.opentelemetry.io/collector/receiver/otlpreceiver/internal/metrics

......\pkg\mod\go.opentelemetry.io\collector\receiver\otlpreceiver@v0.64.1\internal\metrics\otlp.go:41:22: undefined: obsreport.MustNewReceiver

go.opentelemetry.io/collector/receiver/otlpreceiver/internal/trace

......\pkg\mod\go.opentelemetry.io\collector\receiver\otlpreceiver@v0.64.1\internal\trace\otlp.go:41:22: undefined: obsreport.MustNewReceiver

@mx-psi
Copy link
Member

mx-psi commented Dec 21, 2022

@Gauravmeenu can you share a minimal example where this is happening for you?

@mx-psi mx-psi added bug Something isn't working priority:p1 High area:builder and removed release labels Dec 21, 2022
@Gauravmeenu
Copy link
Author

Actually When I'm creating a custom collector distribution with ocb 0.68.0 and manifest.yaml file ,
this is my manifest.yaml file ,

dist:
name: custom-otelcol # the binary name. Optional.
output_path: ./custom-otelcol # the path to write the output (sources and binary). Optional..

exporters:

  • gomod:
    "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter
    v0.68.0"
  • import: go.opentelemetry.io/collector/exporter/loggingexporter
    gomod: go.opentelemetry.io/collector v0.68.0

receivers:

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

processors:

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

Then I'm getting error which I has mentioned in the above comment section

@mx-psi
Copy link
Member

mx-psi commented Dec 21, 2022

This relates to #5992.

As stated in the changelog, since v0.64.0 you need to change the gomod for the core components such as the OTLP receiver because they are now served as separate Go modules.

For your manifest, you can fix it as follows:

dist:
  name: custom-otelcol # the binary name. Optional.
  output_path: ./custom-otelcol # the path to write the output (sources and binary). Optional..
   

exporters:
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter v0.68.0
  - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.68.0

receivers:
  - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.68.0

processors:
  - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.68.0

Does making these changes on your manifest solve the issue for you?

@Gauravmeenu
Copy link
Author

@mx-psi Okay.. now I got it thank you so much for letting me know and also for helping me .

@mx-psi
Copy link
Member

mx-psi commented Dec 21, 2022

Glad I could help you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:builder bug Something isn't working priority:p1 High
Projects
None yet
Development

No branches or pull requests

2 participants