Skip to content

Commit

Permalink
remove MDC edits for EMA ID and add it in logback-spring like compone…
Browse files Browse the repository at this point in the history
…nt is
  • Loading branch information
CameronRushton committed Nov 21, 2024
1 parent 1d11692 commit 6ce099c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ protected static void setupMDC(String messageAsString, String receivedClassName)
MDC.clear();
MDC.put(RouteConstants.TRACE_ID, map.get("traceId"));
MDC.put(RouteConstants.ACTOR_ID, map.get("actorId"));
MDC.put(RouteConstants.EVENT_MANAGEMENT_ID, map.get("runtimeAgentId"));

if (scanClassNames.contains(receivedClassName)) {
MDC.put(RouteConstants.SCAN_ID, map.get("scanId"));
Expand Down
2 changes: 1 addition & 1 deletion service/application/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<if condition='property("USE_JSON").equals("true")'>
<then>
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
<customFields>{"component":"event-management-agent-${agentId}"}</customFields>
<customFields>{"component":"event-management-agent-${agentId}", "ema_id":"${agentId}"}</customFields>
<providers>
<stackTrace>
<fieldName>stackTrace</fieldName>
Expand Down

0 comments on commit 6ce099c

Please sign in to comment.