08 Apr 2025
07:52 AM
- last edited on
09 Apr 2025
12:56 PM
by
MaciejNeumann
Hi there,
I am using OneAgent SDK in Java to trace some RPC-like spans, and I want to find them later with DQL using a "fetch".
My snippet with the OneAgent SDK is this:
OutgoingRemoteCallTracer tracer = OneAgentSdkSingleton.getInstance().traceOutgoingRemoteCall(
method,
"Foo",
bar.getBar1(),
ChannelType.OTHER,
bar.getBar2());
and with a simple "fetch spans" I can find the spans just right, but I absolutely cannot find the value of getBar1() (ServiceEndpoint) and getBar2() (ChannelEndPoint) for the RPC call span.
Any idea on where can I find those values?
thanks
Solved! Go to Solution.
10 Apr 2025 08:47 AM
Hi!
Have you tried to report and capture request attributes?
https://www.dynatrace.com/news/blog/capture-any-request-attributes-using-oneagent-sdk/
11 Apr 2025 01:34 PM
thank you @yanezza , yes we did work around it with a request attribute inside the scope of the tracer, and it works.
But it feels like a workaround, even if it is a nice one: why can't I get those precise fields out with DQL, since I can get everything else just fine?
11 Apr 2025 10:28 PM
It should be due data protection reason. In this way you can mark the request attribute as sensitive data and only allowed users can view the value. Another example is if you don’t want to store the data in Dynatrace anymore, you don’t need to change the code and restart the application, with all complication.