Skip to content

Commit 10696ed

Browse files
committed
Remove compatibility processor registration
On recent versions of APM server, this is no longer required. Leaving the processor and methods in place (although unused) in case we need to reintroduce it in the future.
1 parent 2122447 commit 10696ed

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/Elastic.OpenTelemetry.Core/Extensions/TracerProvderBuilderExtensions.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
using Elastic.OpenTelemetry.Configuration;
99
using Elastic.OpenTelemetry.Core;
1010
using Elastic.OpenTelemetry.Diagnostics;
11-
using Elastic.OpenTelemetry.Processors;
12-
using Elastic.OpenTelemetry.Resources;
1311
using Microsoft.Extensions.DependencyInjection;
1412
using Microsoft.Extensions.Logging;
1513

@@ -95,7 +93,6 @@ internal static TracerProviderBuilder AddElasticProcessorsCore(
9593
{
9694
// When we have existing builderState, this method is being invoked from the main WithElasticDefaults method.
9795
// In that scenario, we skip configuring the resource, as it will have already been configured by the caller.
98-
ConfigureBuilderProcessors(builder, builderState, services);
9996
return builder;
10097
}
10198

@@ -104,14 +101,7 @@ internal static TracerProviderBuilder AddElasticProcessorsCore(
104101
[MethodImpl(MethodImplOptions.AggressiveInlining)]
105102
static void ConfigureBuilder(TracerProviderBuilder builder, BuilderState builderState, IServiceCollection? services)
106103
{
107-
builder.ConfigureResource(r => r.WithElasticDefaultsCore(builderState, services, null));
108-
builder.LogAndAddProcessor(new ElasticCompatibilityProcessor(builderState.Components.Logger), builderState);
109-
}
110-
111-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
112-
static void ConfigureBuilderProcessors(TracerProviderBuilder builder, BuilderState builderState, IServiceCollection? services)
113-
{
114-
builder.LogAndAddProcessor(new ElasticCompatibilityProcessor(builderState.Components.Logger), builderState);
104+
builder.ConfigureResource(r => r.WithElasticDefaults(builderState, services));
115105
}
116106
}
117107

src/Elastic.OpenTelemetry.Core/Processors/ElasticCompatibilityProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace Elastic.OpenTelemetry.Processors;
2222
/// </para>
2323
/// </summary>
2424
/// <param name="logger"></param>
25-
public sealed class ElasticCompatibilityProcessor(ILogger? logger) : BaseProcessor<Activity>
25+
internal sealed class ElasticCompatibilityProcessor(ILogger? logger) : BaseProcessor<Activity>
2626
{
2727
private readonly ILogger _logger = logger ?? NullLogger.Instance;
2828

0 commit comments

Comments
 (0)