fix(logging): update object before logging (#14246)

This commit is contained in:
david-leifker 2025-07-28 15:05:57 -05:00 committed by GitHub
parent fb44a85d9d
commit 7196c40a58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View File

@ -103,13 +103,6 @@ public class RequestContext implements ContextInterface {
this.agentName = "Unknown";
}
// Uniform common logging of requests across APIs
log.info(toString());
// API metrics
if (metricUtils != null) {
captureAPIMetrics(metricUtils, this);
}
Span currentSpan = Span.current();
String traceId = null;
if (currentSpan != null) {
@ -120,6 +113,14 @@ public class RequestContext implements ContextInterface {
}
}
this.traceId = traceId;
// Uniform common logging of requests across APIs
log.info(toString());
// API metrics
if (metricUtils != null) {
captureAPIMetrics(metricUtils, this);
}
}
@Override

View File

@ -54,7 +54,7 @@ dependencies {
annotationProcessor externalDependency.lombok
runtimeOnly externalDependency.log4jCore
runtimeOnly externalDependency.log4j2Api
runtimeOnly externalDependency.logbackClassic
implementation externalDependency.logbackClassic
implementation externalDependency.awsMskIamAuth
implementation externalDependency.azureIdentityExtensions
implementation externalDependency.azureIdentity