@@ -157,7 +157,7 @@ public void publishResourceDemandVectorOfTransaction(final ReadWriteSpan readWri
157
157
Long endThread = readWriteSpan .getAttributes ().get (AttributeKey .longKey (Constants .SPAN_ATTRIBUTE_SPAN_END_THREAD ));
158
158
159
159
if (startThread != null && startThread .equals (endThread )) {
160
- Attributes filteredAttributes = getAttributesWithoutRETITSpanAttributes (readWriteSpan .getAttributes ());
160
+ Attributes filteredAttributes = getAttributesWithoutRETITThreadUserAndNetworkClientAttributes (readWriteSpan .getAttributes ());
161
161
// add resource demands to resource demand vector
162
162
publishCpuDemandMetricForTransaction (logCPUTime , readWriteSpan .getAttributes (), filteredAttributes );
163
163
publishMemoryDemandMetricForTransaction (logHeapConsumption , readWriteSpan .getAttributes (), filteredAttributes );
@@ -229,12 +229,17 @@ private void publishNetworkDemandMetricForTransaction(final boolean logNetworkDe
229
229
}
230
230
}
231
231
232
- private Attributes getAttributesWithoutRETITSpanAttributes (final Attributes spanAttributes ) {
232
+ private Attributes getAttributesWithoutRETITThreadUserAndNetworkClientAttributes (final Attributes spanAttributes ) {
233
233
AttributesBuilder attributesBuilder = Attributes .builder ();
234
234
235
235
attributesBuilder .putAll (spanAttributes );
236
236
237
- attributesBuilder .removeIf (key -> key .getKey ().startsWith (Constants .RETIT_NAMESPACE ));
237
+ attributesBuilder .removeIf (key -> key .getKey ().startsWith (Constants .RETIT_NAMESPACE )
238
+ || key .getKey ().startsWith (Constants .NETWORK_NAMESPACE )
239
+ || key .getKey ().startsWith (Constants .THREAD_NAMESPACE )
240
+ || key .getKey ().startsWith (Constants .USER_NAMESPACE )
241
+ || key .getKey ().startsWith (Constants .CLIENT_NAMESPACE )
242
+ || key .getKey ().startsWith (Constants .INSTANCE_NAMESPACE ));
238
243
239
244
return attributesBuilder .build ();
240
245
}
0 commit comments