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

Reduce the public API "footprint" of the Agent #1477

Open
tippmar-nr opened this issue Mar 23, 2023 · 1 comment
Open

Reduce the public API "footprint" of the Agent #1477

tippmar-nr opened this issue Mar 23, 2023 · 1 comment

Comments

@tippmar-nr
Copy link
Member

Describe the story, please be clear on scope of the story.

At present, nearly all classes and interfaces in the .NET Agent are declared as public. In general this isn't a problem, but there have been reports of some customers running to issues in their use of certain dependency injection frameworks and other assembly scanning tools that look for all publicly accessible classes and interfaces in all assemblies loaded into the current application domain.

We should try, to the extent possible, to refactor the .NET Agent to convert all public classes and interfaces that aren't part of our intended public API to internal instead. In general, the only public classes should be those we intentionally expose for clients to use - i.e., the classes in NewRelic.Api.Agent.

Potential issues with a refactor would include impacts on Unit and Integration Tests that need access to classes in the Agent that are currently public. Possible solutions to that issue would be to use the InternalsVisibleTo attribute to allow our test classes access to the internals, or to refactor the code so that concrete classes remain internal while only interfaces would be public and refactor tests to reference interfaces instead of concrete classes.

This work should probably be preceded by a spike to determine the extent of the effort involved and assess the risks of refactoring.

Acceptance Criteria

The Agent should continue to function as it always has, and clients who scan all assemblies for public classes should not experience any errors.

Estimates

Please provide initial t-shirt size
L

@workato-integration
Copy link

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

No branches or pull requests

1 participant