public IMetricsCollectorBuilder AddEndpoint(string name, IMetricHandler handler) { _metricEndpoints.Add(new MetricEndpoint(name, handler)); return(this); }
/// <summary> /// Constructs a new <see cref="SignalFxMetricHandler" /> pointing at the specified <see cref="Uri" />. /// </summary> /// <param name="baseUri"> /// <see cref="Uri" /> of a SignalFx endpoint. /// </param> /// <remarks> /// If the URI points at a UDP endpoint then a StatsD endpoint is assumed, otherwise if the URI /// is HTTP or HTTPS then a REST endpoint is assumed /// </remarks> public SignalFxMetricHandler(Uri baseUri) { _baseUri = baseUri; _activeHandler = GetHandler(); }
/// <summary> /// Constructs a new <see cref="SignalFxMetricHandler" /> pointing at the specified <see cref="Uri" /> /// and using the specified access token. /// </summary> /// <param name="baseUri"> /// <see cref="Uri" /> of a SignalFx endpoint. /// </param> /// <param name="accessToken"> /// An access token. /// </param> /// <remarks> /// If the URI points at a UDP endpoint then a StatsD endpoint is assumed, otherwise if the URI /// is HTTP or HTTPS then a REST endpoint is assumed /// </remarks> public SignalFxMetricHandler(Uri baseUri, string accessToken) { _accessToken = accessToken ?? throw new ArgumentNullException(nameof(accessToken)); _baseUri = baseUri; _activeHandler = GetHandler(); }
public PollResultsController(IContextFactory contextFactory, IMetricHandler metricHandler) : base(contextFactory, metricHandler) { }
public PollVoteController(IContextFactory contextFactory, IMetricHandler metricHandler, IVoteValidatorFactory voteValidatorFactory) : base(contextFactory, metricHandler) { _voteValidatorFactory = voteValidatorFactory; }
public RoutesController(IMetricHandler metricHandler) { _metricHandler = metricHandler ?? new EmptyMetricHandler(); }
public ManageExpiryController(IContextFactory contextFactory, IMetricHandler metricHandler) : base(contextFactory, metricHandler) { }
public ManagePollTypeController(IContextFactory contextFactory, IMetricHandler metricHandler) : base(contextFactory, metricHandler) { }
public ManageQuestionController(IContextFactory contextFactory, IMetricHandler metricHandler) : base(contextFactory, metricHandler) { }
public ManageInvitationController(IContextFactory contextFactory, IMetricHandler metricHandler, ICorrespondenceService correspondenceService) : base(contextFactory, metricHandler) { _correspondenceService = correspondenceService; }
public DashboardController CreateDashboardController(IContextFactory contextFactory, IMetricHandler metricHandler) { return(new DashboardController(contextFactory, metricHandler) { Request = new HttpRequestMessage(), Configuration = new HttpConfiguration() }); }
public WebApiController(IContextFactory contextFactory, IMetricHandler metricHandler) { _contextFactory = contextFactory; _metricHandler = metricHandler ?? new EmptyMetricHandler(); }
public WebApiController() { _contextFactory = new ContextFactory(); _metricHandler = new MetricHandler(_contextFactory); }
public PollChoiceController(IContextFactory contextFactory, IMetricHandler metricHandler) : base(contextFactory, metricHandler) { }
public static ManagePollTypeController CreateManagePollTypeController(IContextFactory contextFactory, IMetricHandler metricHandler) { return(new ManagePollTypeController(contextFactory, metricHandler) { Request = new HttpRequestMessage(), Configuration = new HttpConfiguration() }); }
public DashboardController(IContextFactory contextFactory, IMetricHandler metricHandler) : base(contextFactory, metricHandler) { }
/// <summary> /// Constructs a new endpoint with the specific name and <see cref="IMetricHandler"/>. /// </summary> /// <param name="name"> /// Name of the endpoint. /// </param> /// <param name="handler"> /// An <see cref="IMetricHandler"/> used to serialize and metrics. /// </param> public MetricEndpoint(string name, IMetricHandler handler) { Name = name ?? throw new ArgumentNullException(nameof(name)); Handler = handler ?? throw new ArgumentNullException(nameof(handler)); }
public RoutesController() { var ContextFactory = new ContextFactory(); _metricHandler = new MetricHandler(ContextFactory); }