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

Allow scopes to exclude certain methods / classes #525

Closed
JonasKunz opened this issue Jan 17, 2020 · 0 comments · Fixed by #943
Closed

Allow scopes to exclude certain methods / classes #525

JonasKunz opened this issue Jan 17, 2020 · 0 comments · Fixed by #943
Assignees
Labels
area/agent enhancement New feature or request

Comments

@JonasKunz
Copy link
Member

Scopes allow to select specific methods from classes ast the moment.
E.g. it is easily possible to define scope for all classes implementing a certain interface.

It is however very difficult to exclude certain methods / classes at the moment. For example if you want to instrument all classes implementing an interface except for one class.

To solve this, we should add an exclude option to scopes:

inspectit:
  instrumentation:
    scopes:
       scope_a:
         ...
       scope_b:
         exclude:
           scope_a: true
         ...

In this example scope_b would not instrument the methods matched by scope_a.

It is important that the configuration validation ensures that there are no cycles in the exclude-definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants