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

[extension/receiver/exporter/connector/processor] Move MakeFactoryMap to otelcol #12222

Closed
mx-psi opened this issue Jan 31, 2025 · 0 comments · Fixed by #12220
Closed

[extension/receiver/exporter/connector/processor] Move MakeFactoryMap to otelcol #12222

mx-psi opened this issue Jan 31, 2025 · 0 comments · Fixed by #12220

Comments

@mx-psi
Copy link
Member

mx-psi commented Jan 31, 2025

The MakeFactoryMap functions are (i) redundant after the introduction of generics and (ii) a concept only useful if you have an otelcol. We should move them to otelcol.

From the 2025-01-27 Collector stability working group meeting.

@jade-guiton-dd jade-guiton-dd moved this from Todo to In Progress in Collector: v1 Jan 31, 2025
@jade-guiton-dd jade-guiton-dd moved this from In Progress to Waiting for reviews in Collector: v1 Feb 3, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 13, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
#### Description

At the moment, `receiver`, `scraper`, `processor`, `exporter`, and
`extension` each have their own version of the `MakeFactoryMap`
function, which takes a list of Factories and returns it as a map, with
the component name as the key (and an error if there is overlap).
Because all versions are near-identical except for the Factory type
used, and this function is only used in tests and in the code generated
by OCB (`components.go`), it was suggested to make it generic and move
it to the `otelcol` package.

This PR does exactly that. The old `MakeFactoryMap` functions are
deprecated (and may be removed alongside their tests in a future
release). I also had to make a few other odd changes to fit the new
dependency graph.

#### Link to tracking issue
Resolves #12222

---------

Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Waiting for reviews to Done in Collector: v1 Feb 13, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 18, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number if applicable -->

Remove deprecated symbols

#### Link to tracking issue
Updates #12222, #12305, #11524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment