-
Notifications
You must be signed in to change notification settings - Fork 860
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
snippet inject support like <head lang="en"> #8736
snippet inject support like <head lang="en"> #8736
Conversation
CC @siyuniu-ms |
...mon/bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/servlet/InjectionState.java
Outdated
Show resolved
Hide resolved
There are three solutions currently I could think about:
|
|
I write a simple implemention for let user passed multiple head tag |
@oliver-zhang is it possible to solve this without requiring user configuration? e.g. when scanning, if we find |
@siyuniu-ms What do you think? Which way is better? |
I believe that Trask solution is better because it would result in fewer bugs and reduce the workload for customers. This would save them time in terms of becoming familiar with this functionality. |
...mon/bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/servlet/InjectionState.java
Outdated
Show resolved
Hide resolved
...mon/bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/servlet/InjectionState.java
Outdated
Show resolved
Hide resolved
…/io/opentelemetry/javaagent/bootstrap/servlet/InjectionState.java Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
@mateuszrzeszutek Please take a look at 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.
Hey @oliver-zhang , sorry for the delay. Overall it LGTM 👍
Could you modify the existing snippet injection tests to handle that case?
@mateuszrzeszutek Already added |
.../javaagent/instrumentation/servlet/v3_0/snippet/Servlet3SnippetInjectingResponseWrapper.java
Outdated
Show resolved
Hide resolved
@mateuszrzeszutek @oliver-zhang what do you think of adding these new tests to the unit tests ( |
@mateuszrzeszutek @trask Already added to ( |
@mateuszrzeszutek @trask Please take a look at this, what else needs to be done? |
I'm in favor of removing the new integration tests in this PR, they add a lot of extra code and I don't think have much value over the new "unit tests" |
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.
thx @oliver-zhang!
@mateuszrzeszutek What do you think ? |
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.
Sorry for the delay; LGTM as well 👍
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com> Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
Closes #8734