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

Deprecate component.Host.GetFactory #10709

Merged

Conversation

TylerHelmuth
Copy link
Member

Description

This PR deprecates the component.Host.GetFactory interface. This has the benefit of keeping the component.Host interface as simple as possible. Components that were relying on this method can instead check if the underlying component.Host implementation supports the interface. An example of this pattern can be found here:

hostZPages, ok := host.(interface {
RegisterZPages(mux *http.ServeMux, pathPrefix string)
})
if ok {
hostZPages.RegisterZPages(zPagesMux, "/debug")
zpe.telemetry.Logger.Info("Registered Host's zPages")
} else {
zpe.telemetry.Logger.Warn("Host's zPages not available")
}

Link to tracking issue

Related to #9511

@TylerHelmuth TylerHelmuth requested review from a team and bogdandrutu July 23, 2024 20:34
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.37%. Comparing base (6171720) to head (e613f86).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10709      +/-   ##
==========================================
- Coverage   92.39%   92.37%   -0.02%     
==========================================
  Files         403      403              
  Lines       18739    18739              
==========================================
- Hits        17313    17311       -2     
- Misses       1066     1068       +2     
  Partials      360      360              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TylerHelmuth TylerHelmuth requested a review from mx-psi July 23, 2024 21:35
@TylerHelmuth TylerHelmuth added the release:blocker The issue must be resolved before cutting the next release label Jul 23, 2024
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.

Could we get a contrib PR doing explicit checking on component.Host to see if it implements this method?

@mx-psi
Copy link
Member

mx-psi commented Jul 24, 2024

@codeboten codeboten merged commit c3a1129 into open-telemetry:main Jul 26, 2024
67 checks passed
@github-actions github-actions bot added this to the next release milestone Jul 26, 2024
@TylerHelmuth TylerHelmuth deleted the component-deprecate-GetFactory branch July 26, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:blocker The issue must be resolved before cutting the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants