File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
src/main/java/com/uber/cadence/internal Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -25,4 +25,5 @@ public class LoggerTag {
25
25
public static final String TASK_LIST = "TaskList" ;
26
26
public static final String WORKFLOW_ID = "WorkflowID" ;
27
27
public static final String WORKFLOW_TYPE = "WorkflowType" ;
28
+ public static final String ATTEMPT = "Attempt" ;
28
29
}
Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ public void handle(PollForActivityTaskResponse task) throws Exception {
144
144
MDC .put (LoggerTag .ACTIVITY_TYPE , task .getActivityType ().getName ());
145
145
MDC .put (LoggerTag .WORKFLOW_ID , task .getWorkflowExecution ().getWorkflowId ());
146
146
MDC .put (LoggerTag .RUN_ID , task .getWorkflowExecution ().getRunId ());
147
+ MDC .put (LoggerTag .ATTEMPT , String .valueOf (task .getAttempt ()));
147
148
148
149
propagateContext (task );
149
150
Span span = spanFactory .spanForExecuteActivity (task );
@@ -175,6 +176,7 @@ public void handle(PollForActivityTaskResponse task) throws Exception {
175
176
MDC .remove (LoggerTag .ACTIVITY_TYPE );
176
177
MDC .remove (LoggerTag .WORKFLOW_ID );
177
178
MDC .remove (LoggerTag .RUN_ID );
179
+ MDC .remove (LoggerTag .ATTEMPT );
178
180
unsetCurrentContext ();
179
181
}
180
182
}
You can’t perform that action at this time.
0 commit comments