public void OnApplicationEvent(uint processId, string id, string name, string parent, OperationSide opSide, OperationType opType, double duration)
 {
     listeners[processId].OnApplicationEvent(processId, id, name, parent, opSide, opType, duration);
 }
        public void OnApplicationEvent(uint processId, string id, string name, string parent, OperationSide opSide, OperationType opType, double duration)
        {
            _telemetry.Context.Operation.Id       = id;
            _telemetry.Context.Operation.Name     = name;
            _telemetry.Context.Operation.ParentId = parent;

            _properties["backend"] = _backend;
            _properties["opside"]  = opSide.ToString();
            _properties["optype"]  = opType.ToString();

            _metrics["duration"] = duration;

            _telemetry.TrackEvent(name, _properties, _metrics);
        }
Exemplo n.º 3
0
 public void OnApplicationEvent(uint processId, string id, string name, string parent, OperationSide opSide, OperationType opType, double duration)
 {
     foreach (var tl in TelemetryListeners)
     {
         tl.OnApplicationEvent(processId, id, name, parent, opSide, opType, duration);
     }
 }
Exemplo n.º 4
0
        public void OnApplicationEvent(uint processId, string id, string name, string parent, OperationSide opSide, OperationType opType, double duration)
        {
            if (opSide == OperationSide.Caller &&
                (configuration.CollectApplicationEvents ||
                 configuration.CollectThroughput ||
                 configuration.CollectHostEvents && opType == OperationType.Host))
            {
                TimeSpan time = stopwatch.Elapsed;

                TelemetryEvents.Add(
                    new TelemetryEvent()
                {
                    id       = id,
                    name     = name,
                    parent   = parent,
                    duration = duration,
                    opSide   = opSide,
                    opType   = opType,
                    time     = time.TotalMilliseconds
                }
                    );
            }
        }