Skip to content

Commit 528e4cd

Browse files
committed
- Add ServiceName to represent APIs defined via Policystudio
1 parent 946703e commit 528e4cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/axway/oneagent/utils/OneAgentSDKUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ public static Object aroundConsumer(ProceedingJoinPoint pjp, Message message, St
130130
String appName = (String) message.getOrDefault("authentication.application.name", DEFAULT);
131131
String orgName = (String) message.getOrDefault("authentication.organization.name", DEFAULT);
132132
String appId = (String) message.getOrDefault("authentication.subject.id", DEFAULT);
133+
String serviceName = (String) message.getOrDefault("service.name", DEFAULT);
134+
if (serviceName != null)
135+
oneAgentSdk.addCustomRequestAttribute("ServiceName", serviceName);
133136
addRequestAttributes(appName, orgName, appId, message.getIDBase());
134137
tracer.setStatusCode(getHTTPStatusCode(message));
135138
tracer.end();

0 commit comments

Comments
 (0)