Esempio n. 1
0
 /// <summary>
 /// OnMethodBegin callback
 /// </summary>
 /// <typeparam name="TTarget">Type of the target</typeparam>
 /// <param name="instance">Instance value, aka `this` of the instrumented method.</param>
 /// <returns>Calltarget state value</returns>
 public static CallTargetState OnMethodBegin <TTarget>(TTarget instance)
 {
     // If we are already in a consumer scope, close it.
     KafkaIntegration.CloseConsumerTransaction(Agent.Instance);
     return(CallTargetState.GetDefault());
 }
Esempio n. 2
0
 /// <summary>
 /// OnMethodBegin callback
 /// </summary>
 /// <typeparam name="TTarget">Type of the target</typeparam>
 /// <param name="instance">Instance value, aka `this` of the instrumented method.</param>
 /// <param name="millisecondsTimeout">The maximum period of time the call may block.</param>
 /// <returns>Calltarget state value</returns>
 public static CallTargetState OnMethodBegin <TTarget>(TTarget instance, int millisecondsTimeout)
 {
     // If we are already in a consumer scope, close it, and start a new one on method exit.
     KafkaIntegration.CloseConsumerTransaction(Agent.Instance);
     return(CallTargetState.GetDefault());
 }