I am trying to use LogEntry.trace as a correlation identifier to tie different log messages together. I wasn't sure if this would be a good idea, but I got some confirmation from here:
A non-sampled trace value is still useful as a request correlation identifier.
Being able to click on "Show matching entries" in the log view seems like a really useful thing to have:

The Bunyan logging wrapper uses the agent.getCurrentContextId(). The problem is that getCurrentContextId() only seems to return a value if the current request is being sampled, and null otherwise.
Is this intended? Would it be possible to still return a traceId from getCurrentContextId() or perhaps expose another function to do this, for the sake of logging the trace id, to be able to correlate log entries.
I am trying to use
LogEntry.traceas a correlation identifier to tie different log messages together. I wasn't sure if this would be a good idea, but I got some confirmation from here:Being able to click on "Show matching entries" in the log view seems like a really useful thing to have:
The Bunyan logging wrapper uses the
agent.getCurrentContextId(). The problem is thatgetCurrentContextId()only seems to return a value if the current request is being sampled, andnullotherwise.Is this intended? Would it be possible to still return a traceId from
getCurrentContextId()or perhaps expose another function to do this, for the sake of logging the trace id, to be able to correlate log entries.