32
loading...
This website collects cookies to deliver better user experience
var pubsubMessage = PubsubMessage.newBuilder()
.setData(data)
.putAttributes(MDC_FIELD_TRACE_ID, MDC.get(MDC_FIELD_TRACE_ID))
.build();
traceId
). This is constant from StackdriverTraceConstants class. It is used to group logs, and thanks to it GCP Logging will be able to diffrentiate between different ones.MDC.put(MDC_FIELD_TRACE_ID, traceId);
MDC.put(MDC_FIELD_SPAN_ID, UUID.randomUUID().toString());