Ejemplo n.º 1
0
        /// <summary>
        /// Main method - invoke this using command line.
        /// For example:
        ///
        /// Samples.dll zipkin http://localhost:9411/api/v2/spans
        /// Sample.dll appInsights
        /// Sample.dll prometheus.
        /// </summary>
        /// <param name="args">Arguments from command line.</param>
        public static void Main(string[] args)
        {
            Parser.Default.ParseArguments <ZipkinOptions, ApplicationInsightsOptions, PrometheusOptions, HttpClientOptions, StackdriverOptions>(args)
            .MapResult(
                (ZipkinOptions options) => TestZipkin.Run(options.Uri),
                (ApplicationInsightsOptions options) => TestApplicationInsights.Run(),
                (PrometheusOptions options) => TestPrometheus.Run(),
                (HttpClientOptions options) => TestHttpClient.Run(),
                (RedisOptions options) => TestRedis.Run(options.Uri),
                (StackdriverOptions options) => TestStackdriver.Run(options.ProjectId),
                errs => 1);

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Main method - invoke this using command line.
        /// For example:
        ///
        /// Samples.dll zipkin -u http://localhost:9411/api/v2/spans
        /// Sample.dll appInsights
        /// Sample.dll prometheus.
        /// </summary>
        /// <param name="args">Arguments from command line.</param>
        public static void Main(string[] args)
        {
            Parser.Default.ParseArguments <JaegerOptions, ZipkinOptions, ApplicationInsightsOptions, PrometheusOptions, HttpClientOptions, StackdriverOptions, LightStepOptions, ConsoleOptions>(args)
            .MapResult(
                (JaegerOptions options) => TestJaeger.Run(options.Host, options.Port),
                (ZipkinOptions options) => TestZipkin.Run(options.Uri),
                (ApplicationInsightsOptions options) => TestApplicationInsights.Run(),
                (PrometheusOptions options) => TestPrometheus.Run(),
                (HttpClientOptions options) => TestHttpClient.Run(),
                (RedisOptions options) => TestRedis.Run(options.Uri),
                (StackdriverOptions options) => TestStackdriver.Run(options.ProjectId),
                (LightStepOptions options) => TestLightstep.Run(options.AccessToken),
                (ConsoleOptions options) => TestConsole.Run(options),
                errs => 1);

            Console.ReadLine();
        }