Using Application Tracking ID for Filtering in Signoz

TLDR Shuba wanted to replace Signoz trace id with their application's tracking id. nitya-signoz explained this was impossible but suggested using the application tracking id as an attribute instead and provided relevant links.

Photo of Shuba
Shuba
Wed, 20 Sep 2023 03:37:59 UTC

Hi Team, my spring boot tomcat application is using otel exporter to send data to signoz and am able to see logs and traces successfully. Thanks ! We need help to use our applications tracking id to filter logs and traces instead of the trace id generated by Signoz. Can we get some help here please ?

Photo of Shuba
Shuba
Mon, 25 Sep 2023 07:06:58 UTC

nitya-signoz Please help

Photo of nitya-signoz
nitya-signoz
Mon, 25 Sep 2023 07:10:17 UTC

You can add your tracking id as an attribute to your logs and filter using that id ?

Photo of Shuba
Shuba
Mon, 25 Sep 2023 09:47:52 UTC

nitya-signoz, I mean we want to override the default signoz trace id value and show just our tracking id everywhere. Do we have options for the same ?

Photo of nitya-signoz
nitya-signoz
Mon, 25 Sep 2023 10:10:38 UTC

oh that’s not possible as it will not be a valid traceId and it will be ignored. I would suggest using an attribute, it will be the same

Photo of Shuba
Shuba
Mon, 25 Sep 2023 11:09:07 UTC

nitya-signoz do we have any documentation for this ?

Photo of nitya-signoz
nitya-signoz
Mon, 25 Sep 2023 11:46:42 UTC

For populating trace_id and span_id this is used and it will ignore the values which doesn’t correspond to an otel trace_id/span_id. By attribute I mean a field. So if you add code attributes you can configure your agent to send those attributes using `-Dotel.instrumentation.logback-appender.experimental.capture-code-attributes=true` More links here