Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Jul 2, 2024
1 parent da3bba4 commit 77033ba
Showing 1 changed file with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Diagnostics.Tracing;
using System.Diagnostics.Tracing;
using Elastic.OpenTelemetry.Configuration;
using Elastic.OpenTelemetry.Extensions;
using Microsoft.Extensions.Logging;
Expand All @@ -20,48 +20,48 @@ public class ElasticAutoInstrumentationPlugin
private readonly EventListener _eventListener;

/// <inheritdoc cref="ElasticAutoInstrumentationPlugin"/>
public ElasticAutoInstrumentationPlugin()
public ElasticAutoInstrumentationPlugin()
{
var options = new ElasticOpenTelemetryBuilderOptions();
var (eventListener, logger) = ElasticOpenTelemetryBuilder.Bootstrap(options);

_logger = logger;
_eventListener= eventListener;
}
_eventListener = eventListener;
}

/// To access TracerProvider right after TracerProviderBuilder.Build() is executed.
public void TracerProviderInitialized(TracerProvider tracerProvider)
{
}
/// To access TracerProvider right after TracerProviderBuilder.Build() is executed.
public void TracerProviderInitialized(TracerProvider tracerProvider)
{
}

/// To access MeterProvider right after MeterProviderBuilder.Build() is executed.
public void MeterProviderInitialized(MeterProvider meterProvider)
{
}
/// To access MeterProvider right after MeterProviderBuilder.Build() is executed.
public void MeterProviderInitialized(MeterProvider meterProvider)
{
}

/// To configure tracing SDK before Auto Instrumentation configured SDK
public TracerProviderBuilder BeforeConfigureTracerProvider(TracerProviderBuilder builder) =>
/// To configure tracing SDK before Auto Instrumentation configured SDK
public TracerProviderBuilder BeforeConfigureTracerProvider(TracerProviderBuilder builder) =>
builder.UseElasticDefaults(_logger);


/// To configure tracing SDK after Auto Instrumentation configured SDK
public TracerProviderBuilder AfterConfigureTracerProvider(TracerProviderBuilder builder) =>
public TracerProviderBuilder AfterConfigureTracerProvider(TracerProviderBuilder builder) =>
builder;

/// To configure metrics SDK before Auto Instrumentation configured SDK
public MeterProviderBuilder BeforeConfigureMeterProvider(MeterProviderBuilder builder) =>
/// To configure metrics SDK before Auto Instrumentation configured SDK
public MeterProviderBuilder BeforeConfigureMeterProvider(MeterProviderBuilder builder) =>
builder.UseElasticDefaults(_logger);

/// To configure metrics SDK after Auto Instrumentation configured SDK
public MeterProviderBuilder AfterConfigureMeterProvider(MeterProviderBuilder builder) =>
public MeterProviderBuilder AfterConfigureMeterProvider(MeterProviderBuilder builder) =>
builder;


/// To configure logs SDK (the method name is the same as for other logs options)
public void ConfigureLogsOptions(OpenTelemetryLoggerOptions options) =>
/// To configure logs SDK (the method name is the same as for other logs options)
public void ConfigureLogsOptions(OpenTelemetryLoggerOptions options) =>
options.UseElasticDefaults(_logger);

/// To configure Resource
public ResourceBuilder ConfigureResource(ResourceBuilder builder) =>
public ResourceBuilder ConfigureResource(ResourceBuilder builder) =>
builder.UseElasticDefaults(_logger);
}

0 comments on commit 77033ba

Please sign in to comment.