Skip to content

Commit 915b277

Browse files
committed
test
1 parent ca9e61f commit 915b277

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

validator/src/main/java/com/amazon/aoc/validators/TraceValidator.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,9 @@ private Map<String, Object> getTrace() throws Exception {
149149
}
150150

151151
if (validationConfig.getHttpPath().contains("chat")) {
152-
traceFilter = "";
153-
if (context.getTraceId() != null) {
154-
traceFilter = String.format("trace.id = \"%s\"", context.getTraceId());
155-
}
152+
traceFilter = String.format("service(\"%s\") AND annotation.aws_service_type = \"gen_ai_agent\"", context.getServiceName());
156153
if (context.getBaggage() != null) {
157-
if (!traceFilter.isEmpty()) {
158-
traceFilter += " AND ";
159-
}
160-
traceFilter += String.format("annotation.session_id = \"%s\"", context.getBaggage());
154+
traceFilter += String.format(" AND annotation.session_id = \"%s\"", context.getBaggage());
161155
}
162156
}
163157
log.info("Trace Filter: {}", traceFilter);

0 commit comments

Comments
 (0)