Example #1
0
        public void JaegerExporter_Batching()
        {
            using JaegerExporter exporter = new JaegerExporter(
                      new JaegerExporterOptions(),
                      new BlackHoleTransport())
                  {
                      Process = new Jaeger.Process("TestService"),
                  };

            for (int i = 0; i < this.NumberOfBatches; i++)
            {
                for (int c = 0; c < this.NumberOfSpans; c++)
                {
                    this.activityBatch.Add(this.activity);
                }

                exporter.Export(new Batch <Activity>(this.activityBatch, this.NumberOfSpans));
            }

            exporter.Shutdown();
        }
        public void JaegerExporter_Batching()
        {
            using JaegerExporter exporter = new JaegerExporter(
                      new JaegerExporterOptions(),
                      new TCompactProtocol.Factory(),
                      new NoopJaegerClient())
                  {
                      Process = new Jaeger::OpenTelemetry.Exporter.Jaeger.Implementation.Process("TestService"),
                  };

            for (int i = 0; i < this.NumberOfBatches; i++)
            {
                for (int c = 0; c < this.NumberOfSpans; c++)
                {
                    this.activityBatch.Add(this.activity);
                }

                exporter.Export(new Batch <Activity>(this.activityBatch, this.NumberOfSpans));
            }

            exporter.Shutdown();
        }