Closed Rutik333 closed 2 years ago
It is possible to capture servlet request parameters as span attributes. See https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/ It is not possible to capture the whole request body out of the box, but you can implement it yourself.
@laurit I go through that article but I don't understand how to do that do you have any sample example?
I tried with @WithSpan and @SpanAttribute from https://opentelemetry.io/docs/instrumentation/java/automatic/annotations/ after adding that I'm getting request body but I don't want to do changes in my code please help me on this
If you do not wish to change you own code then you could use an agent extension https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/examples/extension or build a custom agent.
Feel free to reopen if you have more questions.
It is possible to capture servlet request parameters as span attributes. See https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/ It is not possible to capture the whole request body out of the box, but you can implement it yourself.
@laurit Hello, I was wondering if there are any considerations within the roadmap of java-instrumentation to include recording of the HTTP request body as a default or experimental attribute?
If not, is this due to the limit of performance/attribute value length, or other factors?
Thanks for your attention!
hi @Cirilla-zmh, check out #8778
Is there any way to get http. Requestbody in trace span I'm using servlet