Skip to content

Standarize Settings, Params and Parameters in Extensions#3294

Merged
bogdandrutu merged 3 commits intoopen-telemetry:mainfrom
pmatyjasek-sumo:pm_standarize_settings_extensions
Jun 2, 2021
Merged

Standarize Settings, Params and Parameters in Extensions#3294
bogdandrutu merged 3 commits intoopen-telemetry:mainfrom
pmatyjasek-sumo:pm_standarize_settings_extensions

Conversation

@pmatyjasek-sumo
Copy link
Copy Markdown
Contributor

Description:
Continuation work from #2991
Fixes #2650
Replace ExtensionCreateParams with ExtensionCreateSettings.
Replace all dependencies in Extensions.

Signed-off-by: Patryk Matyjasek pmatyjasek@sumologic.com

Link to tracking Issue:
#2650

Testing:
Update unit tests

Documentation:
In code comments

@pmatyjasek-sumo pmatyjasek-sumo requested a review from a team May 25, 2021 13:06
@pmatyjasek-sumo pmatyjasek-sumo force-pushed the pm_standarize_settings_extensions branch 2 times, most recently from ce216ad to c55f232 Compare May 27, 2021 12:49
@bogdandrutu
Copy link
Copy Markdown
Member

Lint errors:

make[1]: Leaving directory '/home/runner/work/opentelemetry-collector/opentelemetry-collector'
component/componenttest/nop_extension.go:54:14: ExtensionCreateParams not declared by package component (typecheck)
	_ component.ExtensionCreateParams,
	            ^
component/componenttest/nop_extension_test.go:35:73: ExtensionCreateParams not declared by package component (typecheck)
	traces, err := factory.CreateExtension(context.Background(), component.ExtensionCreateParams{}, cfg)
	                                                                       ^
config/configcheck/configcheck_test.go:201:83: ExtensionCreateParams not declared by package component (typecheck)
func (b badConfigExtensionFactory) CreateExtension(_ context.Context, _ component.ExtensionCreateParams, _ config.Extension) (component.Extension, error) {
                                                                                  ^
component/extension.go:49:1: exported: comment on exported type ExtensionCreateSettings should be of the form "ExtensionCreateSettings ..." (with optional leading article) (revive)
// ExtensionCreateParams is passed to ExtensionFactory.Create* functions.
^
make[2]: *** [Makefile.Common:26: lint] Error 1

Replace all dependencies in Extensions.

Signed-off-by: Patryk Matyjasek <pmatyjasek@sumologic.com>
Signed-off-by: Patryk Matyjasek <pmatyjasek@sumologic.com>

# Conflicts:
#	CHANGELOG.md
@pmatyjasek-sumo pmatyjasek-sumo force-pushed the pm_standarize_settings_extensions branch from c55f232 to 740a562 Compare May 31, 2021 08:53
Signed-off-by: Patryk Matyjasek <pmatyjasek@sumologic.com>
@pmatyjasek-sumo pmatyjasek-sumo force-pushed the pm_standarize_settings_extensions branch from 740a562 to bc84d36 Compare May 31, 2021 09:13
@bogdandrutu bogdandrutu merged commit 827f5e1 into open-telemetry:main Jun 2, 2021
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 this pull request may close these issues.

Standardize on params vs settings vs options

2 participants