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

add stability level to component factory #5580

Merged

Conversation

codeboten
Copy link
Contributor

@codeboten codeboten commented Jun 22, 2022

The following allows the setting of a stability level on the factory. This will let us consolidate warnings across all components to notify users of deprecated, unmaintained components.

@codeboten codeboten requested review from a team and mx-psi June 22, 2022 21:50
@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #5580 (3e39909) into main (d63aea3) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5580      +/-   ##
==========================================
+ Coverage   91.27%   91.33%   +0.06%     
==========================================
  Files         191      191              
  Lines       11304    11384      +80     
==========================================
+ Hits        10318    10398      +80     
- Misses        785      786       +1     
+ Partials      201      200       -1     
Impacted Files Coverage Δ
component/componenttest/nop_exporter.go 100.00% <ø> (ø)
component/componenttest/nop_processor.go 100.00% <ø> (ø)
component/componenttest/nop_receiver.go 100.00% <ø> (ø)
internal/testcomponents/example_processor.go 100.00% <ø> (ø)
internal/testcomponents/example_receiver.go 100.00% <ø> (ø)
component/component.go 100.00% <100.00%> (ø)
component/exporter.go 100.00% <100.00%> (ø)
component/processor.go 100.00% <100.00%> (ø)
component/receiver.go 100.00% <100.00%> (ø)
exporter/loggingexporter/factory.go 77.77% <100.00%> (+0.41%) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d63aea3...3e39909. Read the comment docs.

component/component.go Show resolved Hide resolved
component/exporter.go Outdated Show resolved Hide resolved
Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for a case where I think we should error out

component/exporter.go Show resolved Hide resolved
component/component.go Outdated Show resolved Hide resolved
component/exporter.go Outdated Show resolved Hide resolved
service/internal/pipelines/pipelines.go Outdated Show resolved Hide resolved
service/internal/pipelines/pipelines.go Show resolved Hide resolved
component/exporter.go Outdated Show resolved Hide resolved
@codeboten codeboten force-pushed the codeboten/add-stability-level branch from 3795de6 to dc73bfb Compare June 29, 2022 21:48
Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me. I would split the logging / zpages part.

component/componenttest/nop_processor.go Outdated Show resolved Hide resolved
component/exporter.go Show resolved Hide resolved
@@ -304,6 +304,21 @@ func Build(ctx context.Context, settings component.TelemetrySettings, buildInfo
return exps, nil
}

func logStabilityMessage(logger *zap.Logger, sl component.StabilityLevel) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a "InfoMessage" (or find a better name) on component.StabilityLevel (can even accept zap.Log or return the string) to help with this?

Reason: you forget to do the same in extensions package, where you will need to duplicate this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I thought about it and ended up choosing to go this route, but you're right we'll need the same thing for extensions.

I'll follow up this PR with a fix for this that can be used in extensions

@codeboten codeboten merged commit 9f0d97c into open-telemetry:main Jul 5, 2022
@codeboten codeboten deleted the codeboten/add-stability-level branch June 22, 2023 15:29
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.

5 participants