Beispiel #1
0
 /**
  * Indicates that application tracking event has ended.
  *
  * @param ccode completion code of the tracking event
  * @param rcode reason code associated with this tracking event
  * @param opEx exception associated with this tracking event
  * @param endTime time when the tracking event has ended (usec)
  * @param elpasedUsec elapsed time in (usec)
  * @see OpCompCode
  */
 public void stop(
     OpCompCode ccode, int rcode, Throwable opEx, UsecTimestamp endTime, long elpasedUsec) {
   operation.setException(opEx);
   operation.setCompCode(ccode);
   operation.setReasonCode(rcode);
   operation.stop(endTime, elpasedUsec);
 }
Beispiel #2
0
 /**
  * Create a new instance of tracking event that can be timed and reported.
  *
  * @param tr tracker instance
  * @param src event source
  * @param severity severity level
  * @param opType operation type
  * @param opName operation name associated with this event (tracking event name)
  * @param correlator associated with this event (could be unique or passed from a correlated
  *     activity)
  * @param tag associated with this event
  * @param msg binary message associated with this event
  * @param args argument list passed along side the message
  * @see OpLevel
  * @see OpType
  */
 protected TrackingEvent(
     TrackerImpl tr,
     Source src,
     OpLevel severity,
     OpType opType,
     String opName,
     String correlator,
     String tag,
     byte[] msg,
     Object... args) {
   super(null, msg, args);
   tracker = tr;
   operation = new Operation(opName, opType);
   operation.setSeverity(severity);
   operation.setCorrelator(correlator);
   operation.setException(Utils.getThrowable(args));
   setSource(src);
   setLocation(src);
   setTag(tag);
 }
Beispiel #3
0
 /**
  * Indicates that application tracking event has ended.
  *
  * @param ccode completion code of the tracking event
  * @param rcode reason code associated with this tracking event
  * @param opEx exception associated with this tracking event
  * @see OpCompCode
  */
 public void stop(OpCompCode ccode, int rcode, Throwable opEx) {
   operation.setException(opEx);
   operation.setCompCode(ccode);
   operation.setReasonCode(rcode);
   operation.stop();
 }
Beispiel #4
0
 /**
  * Indicates that application tracking event has ended. Event completion code is set to <code>
  * OpCompCode.WARNING</code>
  *
  * @param opEx exception associated with this tracking event
  * @param elapsedUsec elapsed time in (usec)
  */
 public void stop(Throwable opEx, long elapsedUsec) {
   operation.setException(opEx);
   operation.setCompCode(opEx != null ? OpCompCode.WARNING : OpCompCode.SUCCESS);
   operation.stop(Useconds.CURRENT.get(), elapsedUsec);
 }
Beispiel #5
0
 /**
  * Indicates that application tracking event has ended. Event completion code is set to <code>
  * OpCompCode.WARNING</code>
  *
  * @param opEx exception associated with this tracking event
  */
 public void stop(Throwable opEx) {
   operation.setException(opEx);
   operation.stop();
   operation.setCompCode(opEx != null ? OpCompCode.WARNING : OpCompCode.SUCCESS);
 }