public void Configure()
        {
            var configuration = DependencyContainer.GetService <IConfiguration>();
            var loggerFactory = DependencyContainer.GetService <ILoggerFactory>();

            metricsExporter = new CloudFoundryForwarderExporter(new CloudFoundryForwarderOptions(configuration),
                                                                OpenCensusStats.Instance,
                                                                loggerFactory.CreateLogger <CloudFoundryForwarderExporter>());
        }
コード例 #2
0
        public static void UseCloudFoundryMetricsExporter(IConfiguration configuration, ILoggerFactory loggerFactory = null)
        {
            var options = new CloudFoundryForwarderOptions(configuration);

            MetricsExporter = new CloudFoundryForwarderExporter(options, OpenCensusStats.Instance, loggerFactory != null ? loggerFactory.CreateLogger <CloudFoundryForwarderExporter>() : null);
        }