|
9 | 9 |
|
10 | 10 | import com.newrelic.agent.attributes.AttributesService;
|
11 | 11 | import com.newrelic.api.agent.Logs;
|
| 12 | +import com.newrelic.api.agent.NewRelic; |
12 | 13 | import com.newrelic.api.agent.TransportType;
|
13 | 14 | import com.newrelic.agent.config.AgentConfig;
|
14 | 15 | import com.newrelic.agent.config.AgentConfigImpl;
|
|
31 | 32 | import java.util.Collection;
|
32 | 33 | import java.util.Map;
|
33 | 34 | import java.util.Set;
|
| 35 | +import java.util.logging.Level; |
34 | 36 |
|
35 | 37 | public class TransactionData {
|
36 | 38 | private final Transaction tx;
|
@@ -166,6 +168,10 @@ public boolean hasReportableErrorThatIsNotIgnored() {
|
166 | 168 | return tx.isErrorReportableAndNotIgnored();
|
167 | 169 | }
|
168 | 170 |
|
| 171 | + public boolean hasErrorThatIsNotExpected() { |
| 172 | + return tx.isErrorNotExpected(); |
| 173 | + } |
| 174 | + |
169 | 175 | /**
|
170 | 176 | * A rough approximation of the transaction size (how much memory we are using with our tracers)
|
171 | 177 | */
|
@@ -257,11 +263,20 @@ public ApdexPerfZone getApdexPerfZone() {
|
257 | 263 | if (!isWebTransaction() && !tx.getAgentConfig().isApdexTSet(getPriorityTransactionName().getName())) {
|
258 | 264 | return null;
|
259 | 265 | }
|
| 266 | + |
| 267 | + if (isApdexFrustrating()) { |
| 268 | + return ApdexPerfZone.FRUSTRATING; |
| 269 | + } |
| 270 | + |
260 | 271 | long responseTimeInMillis = tx.getTransactionTimer().getResponseTimeInMilliseconds() + tx.getExternalTime();
|
261 | 272 | long apdexTInMillis = tx.getAgentConfig().getApdexTInMillis(getPriorityTransactionName().getName());
|
262 | 273 | return ApdexPerfZoneDetermination.getZone(responseTimeInMillis, apdexTInMillis);
|
263 | 274 | }
|
264 | 275 |
|
| 276 | + public boolean isApdexFrustrating() { |
| 277 | + return hasReportableErrorThatIsNotIgnored() && hasErrorThatIsNotExpected(); |
| 278 | + } |
| 279 | + |
265 | 280 | public String parentType() {
|
266 | 281 | if (!receivedInboundDistributedPayload()) {
|
267 | 282 | return null;
|
|
0 commit comments