Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Ability to set the configuration file from the classpath of runtime attachment #2581
Ability to set the configuration file from the classpath of runtime attachment #2581
Changes from 1 commit
d6dd4ee
fed16eb
df3be7f
63db0a2
12fac76
fddd595
87eed82
361ee50
b308bf2
1b43bf7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we update smoke test for runtime attach to test this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but we would have to add the following kind of code to the current test:
The users would instead add a system property with
-Dapplicationinsights.runtime-attach.configuration.file=applicationinsights-test.json
. So, the test would not represent the typical way of configuring the file name. And so, the test would not document the standard way of configuring the file name.Another option could be to rewrite a test to be able to add
-Dapplicationinsights.runtime-attach.configuration.file=applicationinsights-test.json
. However, this would require a significant time for an added code pretty simple.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a todo for now? it's not required for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there some other form of test coverage that may be simpler (but still useful)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An approach could be to change the visibility of some methods to be able to test them. However, I don't recommend doing this. The major drawback of this approach is that we are testing implementation details, not a user use case. So, since the test is tied to implementation details, refactoring (changing the code without changing the behavior) could break it (because we remove a method, for example), adding a cost to test maintenance and slowing down and discouraging future refactoring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a work item for the smoke test and we can discuss if/how to implement it in the future