예제 #1
0
 public Tracer(IRandomGenerator randomGenerator, IStartEndHandler startEndHandler, ITraceConfig traceConfig, IExportComponent exportComponent, IBinaryFormat binaryFormat, ITextFormat textFormat)
 {
     this.spanBuilderOptions = new SpanBuilderOptions(randomGenerator, startEndHandler, traceConfig);
     this.BinaryFormat       = binaryFormat ?? new BinaryFormat();
     this.TextFormat         = textFormat ?? new TraceContextFormat();
     this.exportComponent    = exportComponent;
 }
        private bool disposedValue = false; // To detect redundant dispose calls

        public JaegerExporter(JaegerExporterOptions options, IExportComponent exportComponent)
        {
            this.ValidateOptions(options);
            this.InitializeOptions(options);

            this.options         = options;
            this.exportComponent = exportComponent;
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZipkinTraceExporter"/> class.
        /// This exporter sends Open Census traces to Zipkin.
        /// </summary>
        /// <param name="options">Zipkin exporter configuration options.</param>
        /// <param name="exportComponent">Exporter to get traces from.</param>
        /// <param name="client">Http client to use to upload telemetry.
        /// For local development with invalid certificates use code like this:
        /// new HttpClient(new HttpClientHandler() { ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator }).
        /// </param>
        public ZipkinTraceExporter(ZipkinTraceExporterOptions options, IExportComponent exportComponent, HttpClient client = null)
        {
            this.options = options;

            this.exportComponent = exportComponent;

            this.httpClient = client;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="StackExchangeRedisCallsCollector"/> class.
        /// </summary>
        /// <param name="options">Configuration options for dependencies collector.</param>
        /// <param name="tracer">Tracer to record traced with.</param>
        /// <param name="sampler">Sampler to use to sample dependnecy calls.</param>
        /// <param name="exportComponent">TEMPORARY: handler to send data to.</param>
        public StackExchangeRedisCallsCollector(StackExchangeRedisCallsCollectorOptions options, ITracer tracer, ISampler sampler, IExportComponent exportComponent)
        {
            this.tracer   = tracer;
            this.exporter = exportComponent;
            this.sampler  = sampler;

            this.cancellationTokenSource = new CancellationTokenSource();
            this.cancellationToken       = this.cancellationTokenSource.Token;
            Task.Factory.StartNew(this.DumpEntries, TaskCreationOptions.LongRunning, this.cancellationToken);
        }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OcagentExporter"/> class.
 /// This exporter allows to send Open Census data to OpenTelemetry service or LocalForwarder.
 /// </summary>
 /// <param name="exportComponent">Exporter to get traces from.</param>
 /// <param name="agentEndpoint">Agent endpoint in the host:port format.</param>
 /// <param name="hostName">Name of the host.</param>
 /// <param name="serviceName">Name of the application.</param>
 public OcagentExporter(
     IExportComponent exportComponent,
     string agentEndpoint,
     string hostName,
     string serviceName)
 {
     this.exportComponent = exportComponent;
     this.agentEndpoint   = agentEndpoint;
     this.hostName        = hostName;
     this.serviceName     = serviceName;
 }
예제 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StackdriverExporter"/> class.
        /// </summary>
        /// <param name="projectId">Google Cloud ProjectId that is used to send data to Stackdriver</param>
        /// <param name="jsonPath">File path to the json file containing the service credential used to authenticate against Stackdriver APIs</param>
        /// <param name="exportComponent">Exporter to get traces from</param>
        /// <param name="viewManager">View manager to get the stats from</param>
        public StackdriverExporter(
            string projectId,
            string jsonPath,
            IExportComponent exportComponent,
            IViewManager viewManager)
        {
            GaxPreconditions.CheckNotNullOrEmpty(projectId, "projectId");

            this.projectId       = projectId;
            this.jsonPath        = jsonPath;
            this.exportComponent = exportComponent;
            this.viewManager     = viewManager;
        }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StackdriverExporter"/> class.
 /// </summary>
 /// <param name="projectId">Google Cloud ProjectId that is used to send data to Stackdriver</param>
 /// <param name="exportComponent">Exporter to get traces from</param>
 /// <param name="viewManager">View manager to get the stats from</param>
 public StackdriverExporter(
     string projectId,
     IExportComponent exportComponent,
     IViewManager viewManager) : this(projectId, null, exportComponent, viewManager)
 {
 }
예제 #8
0
 public TraceExporter(ITraceExporterOptions options, ITracing tracing, ILogger <TraceExporter> logger = null)
 {
     _options         = options;
     _logger          = logger;
     _exportComponent = tracing.ExportComponent;
 }
예제 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationInsightsExporter"/> class.
 /// This exporter allows to send Open Census data to Azure Application Insights.
 /// </summary>
 /// <param name="exportComponent">Exporter to get traces and metrics from.</param>
 /// <param name="viewManager">View manager to get stats from.</param>
 /// <param name="telemetryConfiguration">Telemetry configuration to use to report telemetry.</param>
 public ApplicationInsightsExporter(IExportComponent exportComponent, IViewManager viewManager, TelemetryConfiguration telemetryConfiguration)
 {
     this.exportComponent        = exportComponent;
     this.viewManager            = viewManager;
     this.telemetryConfiguration = telemetryConfiguration;
 }
예제 #10
0
 public Tracer(IRandomGenerator randomGenerator, IStartEndHandler startEndHandler, ITraceConfig traceConfig, IExportComponent exportComponent)
     : this(randomGenerator, startEndHandler, traceConfig, exportComponent, null, null)
 {
 }
예제 #11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JaegerTraceExporter"/> class.
        /// This exporter sends Open Census traces to Jaeger.
        /// </summary>
        /// <param name="options">Jaeger exporter configuration options.</param>
        /// <param name="exportComponent">Exporter to get traces from.</param>
        public JaegerTraceExporter(JaegerTraceExporterOptions options, IExportComponent exportComponent)
        {
            this.options = options;

            this.exportComponent = exportComponent;
        }
예제 #12
0
 public Tracer(IRandomGenerator randomGenerator, IStartEndHandler startEndHandler, ITraceConfig traceConfig, IExportComponent exportComponent)
 {
     this.spanBuilderOptions = new SpanBuilderOptions(randomGenerator, startEndHandler, traceConfig);
 }