Esempio n. 1
0
 private void ValidateOptions(JaegerExporterOptions options)
 {
     if (string.IsNullOrWhiteSpace(options.ServiceName))
     {
         throw new ArgumentException("ServiceName", "Service Name is required.");
     }
 }
        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;
        }
Esempio n. 3
0
        private bool disposedValue = false; // To detect redundant dispose calls

        public JaegerExporter(JaegerExporterOptions options, ISpanExporter spanExporter)
        {
            this.ValidateOptions(options);
            this.InitializeOptions(options);

            this.options      = options;
            this.spanExporter = spanExporter;
        }
        private bool disposedValue; // To detect redundant dispose calls

        internal JaegerExporter(JaegerExporterOptions options, TTransport clientTransport = null)
        {
            if (options is null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            this.maxPayloadSizeInBytes = (!options.MaxPayloadSizeInBytes.HasValue || options.MaxPayloadSizeInBytes <= 0) ? JaegerExporterOptions.DefaultMaxPayloadSizeInBytes : options.MaxPayloadSizeInBytes.Value;
            this.protocolFactory       = new TCompactProtocol.Factory();
            this.clientTransport       = clientTransport ?? new JaegerThriftClientTransport(options.AgentHost, options.AgentPort);
            this.thriftClient          = new JaegerThriftClient(this.protocolFactory.GetProtocol(this.clientTransport));
            this.memoryTransport       = new InMemoryTransport(16000);
            this.memoryProtocol        = this.protocolFactory.GetProtocol(this.memoryTransport);

            this.Process = new Process(options.ServiceName, options.ProcessTags);
        }
Esempio n. 5
0
        private void InitializeOptions(JaegerExporterOptions options)
        {
            if (string.IsNullOrWhiteSpace(options.AgentHost))
            {
                options.AgentHost = DefaultAgentUdpHost;
            }

            if (!options.AgentPort.HasValue)
            {
                options.AgentPort = DefaultAgentUdpCompactPort;
            }

            if (!options.MaxPacketSize.HasValue)
            {
                options.MaxPacketSize = DefaultMaxPacketSize;
            }
        }
        private bool disposedValue; // To detect redundant dispose calls

        public JaegerExporter(JaegerExporterOptions options)
        {
            this.JaegerAgentUdpBatcher = new JaegerUdpBatcher(options);
        }
Esempio n. 7
0
        private bool disposedValue; // To detect redundant dispose calls

        public JaegerExporter(JaegerExporterOptions options)
            : this(options, null)
        {
        }
Esempio n. 8
0
        private bool disposedValue = false; // To detect redundant dispose calls

        public JaegerTraceExporter(JaegerExporterOptions options)
        {
            this.ValidateOptions(options);
            this.InitializeOptions(options);
        }
 public JaegerTraceExporter(JaegerExporterOptions options, IJaegerUdpBatcher jaegerAgentUdpBatcher)
 {
     this.ValidateOptions(options);
     this.InitializeOptions(options);
     this.jaegerAgentUdpBatcher = jaegerAgentUdpBatcher;
 }
        private bool disposedValue = false; // To detect redundant dispose calls

        public JaegerTraceExporter(JaegerExporterOptions options)
            : this(options, new JaegerUdpBatcher(options))
        {
        }
        private bool disposedValue = false; // To detect redundant dispose calls

        public JaegerTraceExporter(JaegerExporterOptions options)
        {
            this.ValidateOptions(options);
            this.jaegerAgentUdpBatcher = new JaegerUdpBatcher(options);
        }