Skip to content

Commit d9a7499

Browse files
committed
Fix JMS test
1 parent 3e5a764 commit d9a7499

File tree

1 file changed

+3
-1
lines changed
  • agent/exporter/src/main/java/com/microsoft/applicationinsights/agent

1 file changed

+3
-1
lines changed

agent/exporter/src/main/java/com/microsoft/applicationinsights/agent/Exporter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ private void export(SpanData span) {
8787
String instrumentationName = span.getInstrumentationLibraryInfo().getName();
8888
Matcher matcher = COMPONENT_PATTERN.matcher(instrumentationName);
8989
String component = matcher.matches() ? matcher.group(1) : instrumentationName;
90-
if ("jms".equals(component) && span.getName().startsWith("jms.receive") && kind == Kind.CLIENT) {
90+
if ("jms".equals(component) && !span.getParentSpanId().isValid() && kind == Kind.CLIENT) {
9191
// no need to capture these, at least is consistent with prior behavior
92+
// these tend to be frameworks pulling messages which are then pushed to consumers
93+
// where we capture them
9294
return;
9395
}
9496
if (kind == Kind.INTERNAL) {

0 commit comments

Comments
 (0)