-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
move cmd/otel/components to internal/components #4604
Conversation
Why does it need to be accessible? What's the intended use case? |
|
Build failed:
|
internal/components/components.go
Outdated
@@ -143,7 +143,7 @@ func components() (component.Factories, error) { | |||
udplogreceiver.NewFactory(), | |||
} | |||
|
|||
receivers = append(receivers, extraReceivers()...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where extraReceivers() was once called
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't the same, and refers to the enabled unstable components if the build tag is set: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/ac315e8e921efeba1565a6dddec1f7c09fa00667/cmd/otelcontribcol/unstable_components_enabled.go
edit: It's not being used now, but as new unstable components are added there's the ability to enable them conditionally without being locked into this file's contents.
second edit: missed your related comment. Is there a reason moving them to this new internal package is problematic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, its made this way for components that have yet to merged into contrib correct?
But because the unstable components files are apart of the main package, I won't have access to them when moving components.go to internal.
If I am understanding correctly though, you are saying to move over the unstable_components files over to internal as well correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're for components that have been added to the contrib project (and are in the standard receiver, exporter, etc. directories) but haven't been added to the (previously) main component factories for vetting and reliability reasons. By building a collector distribution with the unstable
tag are they available. Once hardened to a reasonable extent they get moved from the unstable_enabled location to the applicable slice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow ok that makes sense I was wondering about that unstable tag. I was thinking that makefiles were only used for testing purposes but it seems that it can also be used to help compilation maybe? Definitely going to look deeper into it but thanks for that explanation!
Ok so I looked into the failing test, and as stated in the error we are not using this extraReceivers function, but I am not sure what we should do with it.
|
Please fix the lint errors |
* moved cmd/otel/components -> internal/components * move unstable_components to internal * update Makefile
…emetry#4604) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.42.0...v1.43.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Description:
Moving functionality - There is currently functionality to get all of the components in both core and contrib inside of cmd/otel/components, and it is also inaccessible because it is saved under a main package.
Link to tracking Issue:
Testing:
Documentation:
n/a