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

ocb should support replacing providers and converters with local codepaths for testing #11649

Closed
jackgopack4 opened this issue Nov 12, 2024 · 0 comments · Fixed by #11653
Closed

Comments

@jackgopack4
Copy link
Contributor

Is your feature request related to a problem? Please describe.
ocb builder-config.yaml manifest files allow replacing components such as connectors, extensions, receivers, exporters, and processors by specifying the path value below the name/version of the module. This doesn't work for providers or converters.
example:

extensions:
  - gomod: github.com/repo/module-name v0.12.0
    path: /my/local/path/to/repo/module-name

Describe the solution you'd like
I plan to add some replace logic in the go.mod templates for ocb for providers and converters similar to the logic in

{{- range .Connectors}}
{{if ne .Path ""}}replace {{.GoMod}} => {{.Path}}{{end}}
{{- end}}
{{- range .Extensions}}
{{if ne .Path ""}}replace {{.GoMod}} => {{.Path}}{{end}}
{{- end}}
{{- range .Receivers}}
{{if ne .Path ""}}replace {{.GoMod}} => {{.Path}}{{end}}
{{- end}}
{{- range .Exporters}}
{{if ne .Path ""}}replace {{.GoMod}} => {{.Path}}{{end}}
{{- end}}
{{- range .Processors}}
{{if ne .Path ""}}replace {{.GoMod}} => {{.Path}}{{end}}
{{- end}}
{{- range .Replaces}}

Describe alternatives you've considered
if this feature shouldn't be supported, we should document which components are allowed to be replaced with local modules in ocb and which ones are not.

Additional context
confmap.Converter only was added as of #11584 so builder must be ran or built from source in order to properly test this feature

djaglowski pushed a commit to djaglowski/opentelemetry-collector that referenced this issue Nov 21, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds ability to replace Providers and Converters with local paths when
building custom collector in ocb
<!-- Issue number if applicable -->
#### Link to tracking issue
Closes open-telemetry#11649

<!--Describe what testing was performed and which tests were added.-->
#### Testing
local build of ocb with locally downloaded converter and provider (can
add this type of test to github actions if others think it is necessary)
<!--Describe the documentation added.-->
#### Documentation
.chloggen file
<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Bogdan Drutu <[email protected]>
HongChenTW pushed a commit to HongChenTW/opentelemetry-collector that referenced this issue Dec 19, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds ability to replace Providers and Converters with local paths when
building custom collector in ocb
<!-- Issue number if applicable -->
#### Link to tracking issue
Closes open-telemetry#11649

<!--Describe what testing was performed and which tests were added.-->
#### Testing
local build of ocb with locally downloaded converter and provider (can
add this type of test to github actions if others think it is necessary)
<!--Describe the documentation added.-->
#### Documentation
.chloggen file
<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Bogdan Drutu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant