You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifbExt, ok:=ext.(interface{ GetBallastSize() uint64 }); ok {
returnbExt.GetBallastSize()
}
}
In the context of service 1.0, I want to answer the following questions:
Is this an acceptable strategy? Is it our preferred way of doing things in some cases?
If the answer to (1) is yes, what stability guarantees do we provide for this? (I'd argue the standard stability guarantee for this is 'none', but maybe we should make this crystal clear in VERSIONING.md)
@mx-psi Are all those even valid use cases to have something in the Host?
E.g. the ballast extension example does not depend on Host implementing anything, it just looks for a specific extension + interface, which is a pattern that I think is more useful (e.g. Jaeger components often interact this way by requiring a specific extension to exist and then using that extension's specific APIs).
The zpages example looks like a hack that was not well-designed. It seems that it's adding an endpoint handler to some central server (admin server?). If so, it seems it could also be solved with an extension dependency, e.g. we could have an admin server extension that other components could add endpoints too (e.g. healthcheck extension could add HC endpoint).
It seems that it's adding an endpoint handler to some central server (admin server?). If so, it seems it could also be solved with an extension dependency, e.g. we could have an admin server extension that other components could add endpoints too (e.g. healthcheck extension could add HC endpoint).
The way we would do this right now is to add the method to component.Host.
I guess the question here is: is it required for the service to implement this zpages support? Or do we consider it optional?
For some components we cast the
component.Host
passed by the service to an interface that implementsRegisterZPages
hidden method which we check for here:opentelemetry-collector/extension/zpagesextension/zpagesextension.go
Lines 58 to 66 in 91f13c3
component.Host.GetFactory
#9511 discusses doing this for the receivercreatorWe have also used this strategy the other way around in the ballast extension:
opentelemetry-collector/service/service.go
Lines 296 to 300 in 91f13c3
In the context of service 1.0, I want to answer the following questions:
VERSIONING.md
)component.Host.GetFactory
#9511?The text was updated successfully, but these errors were encountered: