public ManualPoint Create(string measurement, DateTime?utcTimestamp = null) { var tagCollection = new TagCollection(); _tagReader.Read(tagCollection); return(new ManualPoint(_collector, measurement, new FieldCollection(), tagCollection, utcTimestamp)); }
public Task Invoke(MethodProfilingContext profilingContext) { var profilingFields = new FieldCollection(); var profilingTags = new TagCollection(); _tagReader.Read(profilingTags); profilingFields[MethodProfilingConstants.ElapsedMicroseconds] = profilingContext.ElapsedMicroseconds; profilingTags[MethodProfilingConstants.ImplementationType] = profilingContext.ImplementationType; profilingTags[MethodProfilingConstants.MethodName] = profilingContext.MethodName; profilingTags[MethodProfilingConstants.Namespace] = profilingContext.Namespace; profilingTags[MethodProfilingConstants.ServiceType] = profilingContext.ServiceType; var point = new Point(profilingContext.ProfilerName, profilingFields, profilingTags); return(Task.FromResult(_collector.Push(new Payload(point)))); }
public Task Invoke(RedisProfilingContext profilingContext) { var points = new List <Point>(); foreach (var command in profilingContext.ProfilingCommands) { var redisProfilingFields = new FieldCollection(); var redisProfilingTags = new TagCollection(); _tagReader.Read(redisProfilingTags); redisProfilingFields[RedisProfilingConstants.Elapsed] = command.Elapsed.Milliseconds; redisProfilingFields[RedisProfilingConstants.OperationCount] = command.OperationCount.ToString(); redisProfilingTags[RedisProfilingConstants.ClientName] = command.ClientName; redisProfilingTags[RedisProfilingConstants.Command] = command.Command; redisProfilingTags[RedisProfilingConstants.Db] = command.Db.ToString(); redisProfilingTags[RedisProfilingConstants.Server] = command.Server.ToString(); points.Add(new Point(profilingContext.ProfilerName, redisProfilingFields, redisProfilingTags)); } return(Task.FromResult(_collector.Push(new Payload(points)))); }
public Task Invoke(HttpProfilingContext profilingContext) { var httpProfilingFields = new FieldCollection(); var httProfilingTags = new TagCollection(); _tagReader.Read(httProfilingTags); httpProfilingFields[HttpProfilingConstants.Elapsed] = profilingContext.Elapsed; httProfilingTags[HttpProfilingConstants.HttpHost] = profilingContext.HttpHost; httProfilingTags[HttpProfilingConstants.HttpMethod] = profilingContext.HttpMethod; httProfilingTags[HttpProfilingConstants.HttpPath] = profilingContext.HttpPath; httProfilingTags[HttpProfilingConstants.HttpPort] = profilingContext.HttpPort; httProfilingTags[HttpProfilingConstants.HttpProtocol] = profilingContext.HttpProtocol; httProfilingTags[HttpProfilingConstants.HttpScheme] = profilingContext.HttpScheme; httProfilingTags[HttpProfilingConstants.StatusCode] = profilingContext.StatusCode; httProfilingTags[HttpProfilingConstants.IdentityAuthenticationType] = profilingContext.IdentityAuthenticationType; httProfilingTags[HttpProfilingConstants.IdentityName] = profilingContext.IdentityName; httProfilingTags[HttpProfilingConstants.RequestContentType] = profilingContext.RequestContentType; httProfilingTags[HttpProfilingConstants.ResponseContentType] = profilingContext.ResponseContentType; var point = new Point(profilingContext.ProfilerName, httpProfilingFields, httProfilingTags); return(Task.FromResult(_collector.Push(new Payload(new Point[] { point })))); }