You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❗ please do not add sensitive information in issues, you can provide extra information via email using issue number as reference ❗
Describe the issue
The LogContextPipe will put the value of each parameter in the ThreadContext. The values of the ThreadContext will be logged to -messages.json|log log files and can be used by tools such as Splunk or Grafana to search on these attributes.
In our OTEL experiment we've noticed that these values are always added to the ThreadContext as string values. The ThreadContext values are added to our traces as tags, however we cannot use numeric operators to find traces, i,e: mails.received > 0 because the values are always added as strings.
When looking at the underlying code, the problem becomes obvious. The parameter types are not checked....
I'd expect that when I specify a parameter with type="INTEGER" or type="BOOLEAN" that these are respected and are added to the ThreadContext with their corresponding java types..
The text was updated successfully, but these errors were encountered:
@Laurens-makel , the ThreadContext is based on a Map<String, String> (that means that the key and the value are a String). That's why we use pv.asStringVAlue() to conform to this. I don't see how we can change this for your needs because the ThreadContext is a class in the log4j library.
@Laurens-makel , the ThreadContext is based on a Map<String, String> (that means that the key and the value are a String). That's why we use pv.asStringVAlue() to conform to this. I don't see how we can change this for your needs because the ThreadContext is a class in the log4j library.
Hmm, I was quite sure that I investigated that this would be possible but I probably made a mistake. The current implementation of ThreadContext is indeed String based.
❗ please do not add sensitive information in issues, you can provide extra information via email using issue number as reference ❗
Describe the issue
The
LogContextPipe
will put the value of each parameter in theThreadContext
. The values of theThreadContext
will be logged to-messages.json|log
log files and can be used by tools such as Splunk or Grafana to search on these attributes.In our OTEL experiment we've noticed that these values are always added to the
ThreadContext
as string values. TheThreadContext
values are added to our traces as tags, however we cannot use numeric operators to find traces, i,e:mails.received > 0
because the values are always added as strings.When looking at the underlying code, the problem becomes obvious. The parameter types are not checked....
I'd expect that when I specify a parameter with
type="INTEGER"
ortype="BOOLEAN"
that these are respected and are added to theThreadContext
with their corresponding java types..The text was updated successfully, but these errors were encountered: