[Discussion] Make some agent components internal
See original GitHub issueI’d like to open a discussion about our current AgentComponents
and maybe to make some of the things it exposes internal
.
Currently exposed through AgentComponents
:
IApmLogger
IConfigurationReader
IPayloadSender
I know @SergeyKleyman already works on some IConfigurationReader
refactoring - regardless of that, I’d like to discuss if we maybe would like to make some of those completely internal and not expose it to our users.
Why?
Mainly to simplify things.
I think some of these, especially IConfigurationReader
already caused some challenges to us. Each time we change something on the public API, we make a breaking change.
Plus, all these interfaces add some complexity on the Public API of the agent - although these are optional parameters when you configure the agent, so technically users can ignore it, still, those are there, and people may wonder what those are.
I suspect it’s hard to understand those, and I’m not sure there is a subset of our user-base that even needs to understand these - unless they’d like to contribute to the agent (but that’s a different story).
On the other hand, I’m not sure our users really use those - or even that they should use those.
IConfigurationReader
(or whatever equivalent we’ll have after the refactoring)
This is something that other agents I think do not expose. We already support a couple of ways to configure the agent: 1) environment variables, 2) Microsoft.Extensions.Config, 3) Web.config - if there is more, I think we should just add that and introduce some ways to switch between these configs. Overall I think it’s kind of odd that you can configure how you configure the agent 🤯
IApmLogger
This is probably something that should remain public
IPayloadSender
Once we implement ways to turn off the agent I don’t really see any useful reason for this being public either. Furthermore other than a NoOp implementation I think it’s very hard to offer a proper implementation of this.
Now, these are some early thoughts on this, nothing is decided - I just wanted to write down my thoughts and maye have some input on these.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
@gregkalapos Yes it has already changed and we have to add configs as we upgrade to the newest version. I simply see this as the price we pay.
Since the integrator also need to evaluate new functionality it is not a big deal for this use case.
I really appreciate the way you think about this 😃
All right, closing this now - no change planned near term. Thanks everyone for the feedback!