public HttpHandler(FrontierSetings setings, IMetricScope metricScope, ILog log, IAirlockClient airlockClient) { this.log = log; this.airlockClient = airlockClient; log.Debug("settings: " + setings?.ToPrettyJson()); var httpScope = metricScope.WithTag(MetricsTagNames.Type, "http"); resendTo = setings?.ResendTo; if (string.IsNullOrWhiteSpace(resendTo)) { resendTo = null; } else { resendHttpClient = new HttpClient(); } reportHandlers = new IReportHandler[] { new StacktraceHandler("stacktracejs", httpScope, log, setings), new ReportHandler <CspReport>("csp", httpScope, log), new ReportHandler <PkpReport>("pkp", httpScope, log) }; var handlerScope = metricScope.WithTag(MetricsTagNames.Operation, "handler"); totalCounter = handlerScope.Counter("total"); errorCounter = handlerScope.Counter("errors"); environment = VostokHostingEnvironment.Current.Environment; }
public MetricsAggregatorAirlockEventProcessorProvider( IMetricScope rootMetricScope, IAirlockClient airlockClient, MetricsAggregatorSettings settings) { this.rootMetricScope = rootMetricScope; this.airlockClient = airlockClient; this.settings = settings; }
public MetricsAggregatorProcessor( IAirlockClient airlockClient, IMetricScope rootMetricScope, MetricsAggregatorSettings settings, string eventsRoutingKey) { this.airlockClient = airlockClient; this.rootMetricScope = rootMetricScope; this.settings = settings; this.eventsRoutingKey = eventsRoutingKey; }
public static LoggerConfiguration Airlock( this LoggerSinkConfiguration loggerConfiguration, IAirlockClient airlockClient, string routingKey, LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum) { if (loggerConfiguration == null) { throw new ArgumentNullException(nameof(loggerConfiguration)); } var sink = new AirlockSink(airlockClient, routingKey); return(loggerConfiguration.Sink(sink, restrictedToMinimumLevel)); }
public MetricAggregator( IMetricScope metricScope, IBucketKeyProvider bucketKeyProvider, IAirlockClient airlockClient, TimeSpan cooldownPeriod, Borders borders, string eventsRoutingKey) { aggregatorMetrics = new AggregatorMetrics(metricScope.WithTags(new Dictionary <string, string> { { MetricsTagNames.Type, "aggregation" }, { "routingKey", eventsRoutingKey } })); this.bucketKeyProvider = bucketKeyProvider; this.airlockClient = airlockClient; this.cooldownPeriod = cooldownPeriod; this.borders = borders; metricsRoutingKey = RoutingKey.ReplaceSuffix(eventsRoutingKey, RoutingKey.MetricsSuffix); buckets = new ConcurrentDictionary <BucketKey, IBucket>(); }
public AirlockSink(IAirlockClient airlockClient, string routingKey) : this(() => airlockClient, () => routingKey) { }
public AirlockTraceReporter(IAirlockClient airlockClient, string routingKey) : this(() => airlockClient, () => routingKey) { }
public AirlockMetricReporter(IAirlockClient airlockClient, string routingKeyPrefix) { this.airlockClient = airlockClient; this.routingKeyPrefix = routingKeyPrefix; }
public AirlockLog(IAirlockClient airlockClient, string routingKey) { this.airlockClient = airlockClient; this.routingKey = routingKey; }