Skip to content

Commit 2e4ab29

Browse files
authored
Rename OtlpUdpExporter to XrayUdpExporter (#211)
1 parent 118bd8c commit 2e4ab29

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

exporters/AWS.Distro.OpenTelemetry.Exporter.Xray.Udp/OtlpUdpExporter.cs renamed to exporters/AWS.Distro.OpenTelemetry.Exporter.Xray.Udp/XrayUdpExporter.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@
1212
namespace AWS.Distro.OpenTelemetry.Exporter.Xray.Udp;
1313

1414
/// <summary>
15-
/// OTLP UDP Exporter class. This class is used to build an OtlpUdpExporter to registered as in exporter
15+
/// OTLP UDP Exporter class. This class is used to build an XrayUdpExporter to registered as in exporter
1616
/// during the instrumentation initialization phase
1717
/// </summary>
18-
public class OtlpUdpExporter : BaseExporter<Activity>
18+
public class XrayUdpExporter : BaseExporter<Activity>
1919
{
2020
private static readonly ILoggerFactory Factory = LoggerFactory.Create(builder => builder.AddProvider(new ConsoleLoggerProvider()));
21-
private static readonly ILogger Logger = Factory.CreateLogger<OtlpUdpExporter>();
21+
private static readonly ILogger Logger = Factory.CreateLogger<XrayUdpExporter>();
2222

2323
private UdpExporter udpExporter;
2424
private string signalPrefix;
2525
private Resource processResource;
2626

2727
/// <summary>
28-
/// Initializes a new instance of the <see cref="OtlpUdpExporter"/> class.
28+
/// Initializes a new instance of the <see cref="XrayUdpExporter"/> class.
2929
/// </summary>
3030
/// <param name="endpoint">Endpoint to export requests to</param>
3131
/// <param name="signalPrefix">Sampled vs UnSampled signal prefix</param>
3232
/// <param name="processResource">Otel Resource object</param>
33-
public OtlpUdpExporter(Resource processResource, string? endpoint = null, string? signalPrefix = null)
33+
public XrayUdpExporter(Resource processResource, string? endpoint = null, string? signalPrefix = null)
3434
{
3535
// Check if running in AWS Lambda environment
3636
if (endpoint == null && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("AWS_LAMBDA_FUNCTION_NAME")))

exporters/AWS.Distro.OpenTelemetry.Exporter.Xray.Udp/nuget-readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Sdk.CreateTracerProviderBuilder()
1919
.AddAspNetCoreInstrumentation()
2020
.AddHttpClientInstrumentation()
2121
// Add the X-Ray UDP Exporter
22-
.AddOtlpUdpExporter(resourceBuilder.Build(), "localhost:2000")
22+
.AddXrayUdpExporter(resourceBuilder.Build(), "localhost:2000")
2323
.Build();
2424
```
2525

@@ -36,7 +36,7 @@ builder.Services.AddOpenTelemetry()
3636
builder
3737
.SetResourceBuilder(resourceBuilder)
3838
.AddAspNetCoreInstrumentation()
39-
.AddOtlpUdpExporter(resourceBuilder.Build(), "localhost:2000");
39+
.AddXrayUdpExporter(resourceBuilder.Build(), "localhost:2000");
4040
});
4141
```
4242

sample-applications/udp-exporter-test-app/Startup.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void ConfigureServices(IServiceCollection services)
4444
{
4545
options.Endpoint = new Uri(Environment.GetEnvironmentVariable("OTEL_EXPORTER_OTLP_ENDPOINT"));
4646
})
47-
.AddOtlpUdpExporter(resourceBuilder.Build(), "localhost:2000")
47+
.AddXrayUdpExporter(resourceBuilder.Build(), "localhost:2000")
4848
.Build();
4949
}
5050
else {
@@ -61,7 +61,7 @@ public void ConfigureServices(IServiceCollection services)
6161
{
6262
options.Endpoint = new Uri(Environment.GetEnvironmentVariable("OTEL_EXPORTER_OTLP_ENDPOINT"));
6363
})
64-
.AddOtlpUdpExporter(resourceBuilder.Build(), "localhost:2000")
64+
.AddXrayUdpExporter(resourceBuilder.Build(), "localhost:2000")
6565
.Build();
6666
}
6767

@@ -96,14 +96,14 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
9696

9797
public static class TracerProviderBuilderExtensions
9898
{
99-
public static TracerProviderBuilder AddOtlpUdpExporter(
99+
public static TracerProviderBuilder AddXrayUdpExporter(
100100
this TracerProviderBuilder builder,
101101
Resource resource,
102102
string endpoint)
103103
{
104104
return builder.AddProcessor(
105105
new BatchActivityExportProcessor(
106-
new OtlpUdpExporter(resource, endpoint)
106+
new XrayUdpExporter(resource, endpoint)
107107
)
108108
);
109109
}

src/AWS.Distro.OpenTelemetry.AutoInstrumentation/GlobalSuppressions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Reviewed", Scope = "member", Target = "~M:AWS.Distro.OpenTelemetry.AutoInstrumentation.AwsMetricAttributesSpanExporterBuilder.Create(OpenTelemetry.BaseExporter{System.Diagnostics.Activity},OpenTelemetry.Resources.Resource)~AWS.Distro.OpenTelemetry.AutoInstrumentation.AwsMetricAttributesSpanExporterBuilder")]
1717
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "Reviewed", Scope = "type", Target = "~T:ByteStringConverter")]
1818
[assembly: SuppressMessage("Design", "CA1050:Declare types in namespaces", Justification = "Reviewed", Scope = "type", Target = "~T:ByteStringConverter")]
19-
[assembly: SuppressMessage("Design", "CA1050:Declare types in namespaces", Justification = "Reviewed", Scope = "type", Target = "~T:OtlpUdpExporter")]
19+
[assembly: SuppressMessage("Design", "CA1050:Declare types in namespaces", Justification = "Reviewed", Scope = "type", Target = "~T:XrayUdpExporter")]
2020
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "Reviewed", Scope = "type", Target = "~T:SpanKindConverter")]
2121
[assembly: SuppressMessage("Design", "CA1050:Declare types in namespaces", Justification = "Reviewed", Scope = "type", Target = "~T:SpanKindConverter")]
2222
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "Reviewed", Scope = "type", Target = "~T:UdpExporter")]
2323
[assembly: SuppressMessage("Design", "CA1050:Declare types in namespaces", Justification = "Reviewed", Scope = "type", Target = "~T:UdpExporter")]
24-
[assembly: SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1011:Closing square brackets should be spaced correctly", Justification = "Reviewed", Scope = "member", Target = "~M:OtlpUdpExporter.Export(OpenTelemetry.Batch{System.Diagnostics.Activity}@)~OpenTelemetry.ExportResult")]
24+
[assembly: SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1011:Closing square brackets should be spaced correctly", Justification = "Reviewed", Scope = "member", Target = "~M:XrayUdpExporter.Export(OpenTelemetry.Batch{System.Diagnostics.Activity}@)~OpenTelemetry.ExportResult")]
2525
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "Reviewed", Scope = "type", Target = "~T:StatusCodeConverter")]
2626
[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1307:Accessible fields should begin with upper-case letter", Justification = "Reviewed", Scope = "member", Target = "~F:AWS.Distro.OpenTelemetry.AutoInstrumentation.Version.version")]
2727
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1400:Access modifier should be declared", Justification = "Reviewed", Scope = "type", Target = "~T:AWS.Distro.OpenTelemetry.AutoInstrumentation.Version")]
2828
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:Fields should be private", Justification = "Reviewed", Scope = "member", Target = "~F:AWS.Distro.OpenTelemetry.AutoInstrumentation.Version.version")]
2929
[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1636:File header copyright text should match", Justification = "Reviewed")]
3030
[assembly: SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1011:Closing square brackets should be spaced correctly", Justification = "Reviewed", Scope = "member", Target = "~M:OtlpExporterUtils.SerializeSpans(OpenTelemetry.Batch{System.Diagnostics.Activity},OpenTelemetry.Resources.Resource)~System.Byte[]")]
3131
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "Reviewed", Scope = "type", Target = "~T:RetryHelper")]
32-
[assembly: SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1011:Closing square brackets should be spaced correctly", Justification = "Reviewed", Scope = "member", Target = "~M:OtlpAwsSpanExporter.Export(OpenTelemetry.Batch{System.Diagnostics.Activity}@)~OpenTelemetry.ExportResult,~M:OtlpUdpExporter.SerializeSpans(OpenTelemetry.Batch{System.Diagnostics.Activity})~System.Byte[]")]
32+
[assembly: SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1011:Closing square brackets should be spaced correctly", Justification = "Reviewed", Scope = "member", Target = "~M:OtlpAwsSpanExporter.Export(OpenTelemetry.Batch{System.Diagnostics.Activity}@)~OpenTelemetry.ExportResult,~M:XrayUdpExporter.SerializeSpans(OpenTelemetry.Batch{System.Diagnostics.Activity})~System.Byte[]")]
3333

3434
// TODO, review these suppressions.

src/AWS.Distro.OpenTelemetry.AutoInstrumentation/Plugin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@ public void TracerProviderInitialized(TracerProvider tracerProvider)
157157
Resource processResource = tracerProvider.GetResource();
158158

159159
// UDP exporter for sampled spans
160-
var sampledSpanExporter = new OtlpUdpExporter(processResource, AwsXrayDaemonAddress, FormatOtelSampledTracesBinaryPrefix);
160+
var sampledSpanExporter = new XrayUdpExporter(processResource, AwsXrayDaemonAddress, FormatOtelSampledTracesBinaryPrefix);
161161
tracerProvider.AddProcessor(new BatchActivityExportProcessor(exporter: sampledSpanExporter, maxExportBatchSize: LambdaSpanExportBatchSize));
162162
if (this.IsApplicationSignalsEnabled())
163163
{
164164
// Register UDP Exporter to export unsampled traces in Lambda
165165
// only when Application Signals enabled
166-
var unsampledSpanExporter = new OtlpUdpExporter(processResource, AwsXrayDaemonAddress, FormatOtelUnSampledTracesBinaryPrefix);
166+
var unsampledSpanExporter = new XrayUdpExporter(processResource, AwsXrayDaemonAddress, FormatOtelUnSampledTracesBinaryPrefix);
167167
tracerProvider.AddProcessor(new AwsBatchUnsampledSpanExportProcessor(exporter: unsampledSpanExporter, maxExportBatchSize: LambdaSpanExportBatchSize));
168168
}
169169
}

0 commit comments

Comments
 (0)