-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[extension] Remove Settings.ModuleInfo and move to service.Host hidde…
…n method (#12296) <!--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 --> Moves `extension.Settings.ModuleInfo` to a `service.Host.GetModuleInfo` method. This field probably fits better on `extension.Settings` or even in `component.BuildInfo`, but since its contents are a bit in flux per discussions like #12283, I would like to move it here to not stabilize it alongside the rest of `extension`. The field is not used in any public code on Github, so I think it won't have a huge impact to remove it in one go, happy to do this in two steps if preferred. One relevant difference is that this information is no longer available at extension build time, but rather after the `Start` method is called. Another relevant difference is that this is now available for all component kinds, not just extensions. This could be worked around (we could pass a different host depending on the component kind) but I don't see the use right now. #### Link to tracking issue Updates #12283
- Loading branch information
Showing
7 changed files
with
85 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: breaking | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) | ||
component: extension | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Remove `extension.Settings.ModuleInfo` | ||
|
||
# One or more tracking issues or pull requests related to the change | ||
issues: [12296] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: | | ||
- The functionality is now available as an optional, hidden interface on `service`'s implementation of the `Host` | ||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: [api] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package moduleinfo // import "go.opentelemetry.io/collector/service/internal/moduleinfo" | ||
|
||
import "go.opentelemetry.io/collector/component" | ||
|
||
type ModuleInfo struct { | ||
// BuilderRef is the raw string passed in the builder configuration used to build this service. | ||
BuilderRef string | ||
} | ||
|
||
// ModuleInfos describes the go module for each component. | ||
type ModuleInfos struct { | ||
Receiver map[component.Type]ModuleInfo | ||
Processor map[component.Type]ModuleInfo | ||
Exporter map[component.Type]ModuleInfo | ||
Extension map[component.Type]ModuleInfo | ||
Connector map[component.Type]ModuleInfo | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters