public SpanEndEvent( ISpan span, ISpanExporter spanExporter) { this.span = span; this.spanExporter = spanExporter; }
public StartEndHandler(ISpanExporter spanExporter, IRunningSpanStore runningSpanStore, ISampledSpanStore sampledSpanStore, IEventQueue eventQueue) { this.spanExporter = spanExporter; this.runningSpanStore = runningSpanStore; this.sampledSpanStore = sampledSpanStore; this.enqueueEventForNonSampledSpans = runningSpanStore != null || sampledSpanStore != null; this.eventQueue = eventQueue; }
/// <summary> /// Initializes a new instance of the <see cref="ZipkinTraceExporter"/> class. /// This exporter sends OpenTelemetry spans to Zipkin. /// </summary> /// <param name="options">Zipkin exporter configuration options.</param> /// <param name="exporter">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, ISpanExporter exporter, HttpClient client = null) { this.options = options; this.exporter = exporter; this.httpClient = client; }
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; }
/// <summary> /// Initializes a new instance of the <see cref="StackExchangeRedisCallsCollector"/> class. /// </summary> /// <param name="tracer">Tracer to record traced with.</param> /// <param name="sampler">Sampler to use to sample dependnecy calls.</param> /// <param name="exporter">TEMPORARY: handler to send data to.</param> public StackExchangeRedisCallsCollector(ITracer tracer, ISampler sampler, ISpanExporter exporter) { this.tracer = tracer; this.exporter = exporter; this.sampler = sampler; this.cancellationTokenSource = new CancellationTokenSource(); this.cancellationToken = this.cancellationTokenSource.Token; Task.Factory.StartNew(this.DumpEntries, TaskCreationOptions.LongRunning, this.cancellationToken); }
public SpanEndEvent( ISpan span, ISpanExporter spanExporter, IRunningSpanStore runningSpanStore, ISampledSpanStore sampledSpanStore) { this.span = span; this.runningSpanStore = runningSpanStore; this.spanExporter = spanExporter; this.sampledSpanStore = sampledSpanStore; }
/// <summary> /// Initializes a new instance of the <see cref="OcagentExporter"/> class. /// This exporter allows to send Open Telemetry data to OpenTelemetry service or LocalForwarder. /// </summary> /// <param name="exporter">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( ISpanExporter exporter, string agentEndpoint, string hostName, string serviceName) { this.exporter = exporter; this.agentEndpoint = agentEndpoint; this.hostName = hostName; this.serviceName = serviceName; }
public static OperationsTracingOptions UseExporter( this OperationsTracingOptions options, ISpanExporter exporter) { EnsureArg.IsNotNull(options, nameof(options)); EnsureArg.IsNotNull(options.Context, nameof(options.Context)); options.Context.Services.AddSingleton(exporter); options.Context.Messages.Add($"naos services builder: tracing exporter used (type={exporter.GetType().Name})"); return(options); }
/// <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="exporter">Exporter to get traces from.</param> /// <param name="viewManager">View manager to get the stats from.</param> public StackdriverExporter( string projectId, string jsonPath, ISpanExporter exporter, IViewManager viewManager) { GaxPreconditions.CheckNotNullOrEmpty(projectId, "projectId"); this.projectId = projectId; this.jsonPath = jsonPath; this.exporter = exporter; this.viewManager = viewManager; }
internal static object Run() { SimpleEventQueue eventQueue = new SimpleEventQueue(); ISpanExporter exporter = OpenTelemetry.Trace.Export.SpanExporter.Create(); TelemetryConfiguration.Active.InstrumentationKey = "instrumentation-key"; var appInsightsExporter = new ApplicationInsightsExporter(exporter, Stats.ViewManager, TelemetryConfiguration.Active); appInsightsExporter.Start(); var tagContextBuilder = Tagger.CurrentBuilder.Put(FrontendKey, TagValue.Create("mobile-ios9.3.5")); var spanBuilder = Tracer .SpanBuilder("incoming request") .SetRecordEvents(true) .SetSampler(Samplers.AlwaysSample); Stats.ViewManager.RegisterView(VideoSizeView); using (tagContextBuilder.BuildScoped()) { using (Tracer.WithSpan(spanBuilder.StartSpan())) { Tracer.CurrentSpan.AddEvent("Start processing video."); Thread.Sleep(TimeSpan.FromMilliseconds(10)); StatsRecorder.NewMeasureMap().Put(VideoSize, 25 * MiB).Record(); Tracer.CurrentSpan.AddEvent("Finished processing video."); } } Thread.Sleep(TimeSpan.FromMilliseconds(5100)); var viewData = Stats.ViewManager.GetView(VideoSizeViewName); Console.WriteLine(viewData); Console.WriteLine("Done... wait for events to arrive to backend!"); Console.ReadLine(); exporter.Dispose(); return(null); }
public LightStepTraceExporter(LightStepTraceExporterOptions options, ISpanExporter exporter, HttpClient client = null) { this.options = options; this.exporter = exporter; this.httpClient = client; }
/// <summary> /// Initializes a new instance of the <see cref="ApplicationInsightsExporter"/> class. /// This exporter allows to send OpenTelemetry data to Azure Application Insights. /// </summary> /// <param name="exporter">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(ISpanExporter exporter, IViewManager viewManager, TelemetryConfiguration telemetryConfiguration) { this.exporter = exporter; this.viewManager = viewManager; this.telemetryConfiguration = telemetryConfiguration; }
public StartEndHandler(ISpanExporter spanExporter, IEventQueue eventQueue) { this.spanExporter = spanExporter; this.eventQueue = eventQueue; }
/// <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="exporter">Exporter to get traces from.</param> /// <param name="viewManager">View manager to get the stats from.</param> public StackdriverExporter( string projectId, ISpanExporter exporter, IViewManager viewManager) : this(projectId, null, exporter, viewManager) { }