private DiagnosticSourceInfluxDB(IInfluxDBClient client, Func <string, bool> sourceNamePredicate, Action <DiagnosticListenerOptions> optionsCallback) { _sourceNamePredicate = sourceNamePredicate; _client = client; _listenerOptions = new DiagnosticListenerOptions(); optionsCallback?.Invoke(_listenerOptions); }
internal InfluxLineWriter(string measurement, Type argsType, DiagnosticListenerOptions options) { _measurement = InfluxName.Escape(measurement); _measurementLength = _measurement.Length; _objectFormatter = new ObjectFormatter(argsType, options); _defaultTags = options.DefaultTags; _hasDefaultTags = _defaultTags != null && (_defaultTagsLength = _defaultTags.Length) > 0; _baseLength = _measurementLength + _defaultTagsLength + 2; }
internal DiagnosticListenerObserver(DiagnosticListener listener, IInfluxDBClient client, DiagnosticListenerOptions options) { _listener = listener; _client = client; _formatters = new InfluxLineFormatterCollection(listener.Name, options); _onError = options.OnError; _subscription = listener.Subscribe(this); }