-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[service] Define strategy for 'privileged' components #10181
Comments
@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). |
The way we would do this right now is to add the method to I guess the question here is: is it required for the service to implement this zpages support? Or do we consider it optional? |
Optional. I don't think every If I understand zpages correctly, the zpagesextension handles creating the server, but it depends on the Whatever the reason, it feels reasonable for
I don't care for the pattern in this direction. When the Luckily the ballast extension is deprecated, so that use case will be removed soon. |
This seems acceptable to me. We can require said components to specify the interface they need as part of their public API |
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: