sb = formatAdditionalSqlArguments(methodData); if (sb != null) { telemetry.getContext().getProperties().put("Args", sb.toString()); sb = fetchExplainQuery(commandName, methodData.arguments[2]); if (sb != null) { telemetry.getContext().getProperties().put("Query Plan", sb.toString());
telemetry.getContext().getProperties().put("URI", uri); telemetry.getContext().getProperties().put("Method", method);
@Override public void methodFinished(String classAndMethodNames, long deltaInNS, Object[] args, Throwable throwable) { long durationInMS = nanoToMilliseconds(deltaInNS); Duration duration = new Duration(durationInMS); Date dependencyStartTime = new Date(System.currentTimeMillis() - durationInMS); RemoteDependencyTelemetry telemetry = new RemoteDependencyTelemetry(classAndMethodNames, null, duration, throwable == null); telemetry.setTimestamp(dependencyStartTime); telemetry.setDependencyKind(DependencyKind.Other); if (args != null) { String argsAsString = new ArgsFormatter().format(args); telemetry.getContext().getProperties().put("Args", argsAsString); } InternalLogger.INSTANCE.trace("Sending RDD event for '%s', duration=%s ms", classAndMethodNames, durationInMS); telemetryClient.track(telemetry); if (throwable != null) { ExceptionTelemetry exceptionTelemetry = new ExceptionTelemetry(throwable); telemetryClient.track(exceptionTelemetry); } }
success = true; RemoteDependencyTelemetry dt = new RemoteDependencyTelemetry(dependencyName, commandName, duration, success); dt.getContext().setInstrumentationKey(iKey); testCases.add(new Object[]{ "Dependency, simple", dt.setResultCode(resultCode); dt.setType(depType); dt.getContext().setInstrumentationKey(iKey); dt.getProperties().putAll(props); dt.getMetrics().putAll(metrics);