예제 #1
0
        private string TrackEvent(EventId eventId, object o, string message, params object[] args)
        {
            var evt = eventId.ToEventTelemetry(message, args);

            if (o != null)
            {
                var objectData = ConvertToDictionary(o);
                foreach (var i in objectData)
                {
                    evt.Properties.Add(i.Key, i.Value.ToString());
                }
            }

            _client.TrackEvent(evt);

            return(evt.Context.Operation.Id);
        }