Here are the examples of the csharp api System.Action.Invoke(ZipkinExporterOptions) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
4 Examples
19
Source : Extensions.cs
with MIT License
from cloudnative-netcore
with MIT License
from cloudnative-netcore
public static IServiceCollection AddCustomOtelWithZipkin(this IServiceCollection services,
IConfiguration config, Action<ZipkinExporterOptions> configureZipkin = null)
{
services.AddOpenTelemetry(b => b
.SetSampler(new AlwaysOnSampler())
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddGrpcClientInstrumentation()
.AddSqlClientDependencyInstrumentation()
.AddMediatRInstrumentation()
.UseZipkinExporter(o =>
{
config.Bind("OtelZipkin", o);
configureZipkin?.Invoke(o);
})
);
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(OTelMediatRTracingBehavior<,>));
return services;
}
19
Source : ZipkinExporterHelperExtensions.cs
with Apache License 2.0
from open-telemetry
with Apache License 2.0
from open-telemetry
private static TracerProviderBuilder AddZipkinExporter(TracerProviderBuilder builder, ZipkinExporterOptions options, Action<ZipkinExporterOptions> configure = null)
{
configure?.Invoke(options);
var zipkinExporter = new ZipkinExporter(options);
if (options.ExportProcessorType == ExportProcessorType.Simple)
{
return builder.AddProcessor(new SimpleActivityExportProcessor(zipkinExporter));
}
else
{
return builder.AddProcessor(new BatchActivityExportProcessor(
zipkinExporter,
options.BatchExportProcessorOptions.MaxQueueSize,
options.BatchExportProcessorOptions.ScheduledDelayMilliseconds,
options.BatchExportProcessorOptions.ExporterTimeoutMilliseconds,
options.BatchExportProcessorOptions.MaxExportBatchSize));
}
}
19
Source : Extensions.cs
with MIT License
from thangchung
with MIT License
from thangchung
public static IServiceCollection AddCustomOtelWithZipkin(this IServiceCollection services,
IConfiguration config, Action<ZipkinExporterOptions> configureZipkin = null)
{
services.AddOpenTelemetryTracing(b => b
.SetSampler(new AlwaysOnSampler())
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddGrpcClientInstrumentation()
.AddSqlClientInstrumentation(o => o.SetDbStatementForText = true)
.AddSource(OTelMediatROptions.OTelMediatRName)
.AddZipkinExporter(o =>
{
config.Bind("OtelZipkin", o);
configureZipkin?.Invoke(o);
})
.Build());
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(OTelMediatRTracingBehavior<,>));
return services;
}
19
Source : Extensions.cs
with MIT License
from vietnam-devs
with MIT License
from vietnam-devs
public static IServiceCollection AddCustomOtelWithZipkin(this IServiceCollection services,
IConfiguration config, Action<ZipkinExporterOptions> configureZipkin = null)
{
services.AddOpenTelemetryTracing(b => b
.SetSampler(new AlwaysOnSampler())
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddGrpcClientInstrumentation()
.AddSqlClientInstrumentation(o => o.SetTextCommandContent = true)
.AddSource(OTelMediatROptions.OTelMediatRName)
.AddZipkinExporter(o =>
{
config.Bind("OtelZipkin", o);
configureZipkin?.Invoke(o);
})
.Build());
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(OTelMediatRTracingBehavior<,>));
return services;
}