From a6e67c77575479bc5460d404797a151d85b6cf15 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Tue, 2 Feb 2021 11:55:29 -0800 Subject: [PATCH] Changed default port for OTLP Exporter from 55680 to 4317 --- examples/AspNetCore/appsettings.json | 2 +- examples/Console/Program.cs | 4 ++-- examples/Console/TestOtlpExporter.cs | 4 ++-- src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md | 1 + .../OtlpExporterOptions.cs | 4 ++-- .../OtlpTraceExporterHelperExtensions.cs | 1 - .../docker-compose.yml | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/AspNetCore/appsettings.json b/examples/AspNetCore/appsettings.json index 6fbc8b3aa1d..5d46b6beb06 100644 --- a/examples/AspNetCore/appsettings.json +++ b/examples/AspNetCore/appsettings.json @@ -19,6 +19,6 @@ }, "Otlp": { "ServiceName": "otlp-test", - "Endpoint": "localhost:55680" + "Endpoint": "localhost:4317" } } diff --git a/examples/Console/Program.cs b/examples/Console/Program.cs index e060a68e2ef..522afa0bbae 100644 --- a/examples/Console/Program.cs +++ b/examples/Console/Program.cs @@ -32,7 +32,7 @@ public class Program /// dotnet run -p Examples.Console.csproj zipkin -u http://localhost:9411/api/v2/spans /// dotnet run -p Examples.Console.csproj jaeger -h localhost -p 6831 /// dotnet run -p Examples.Console.csproj prometheus -i 15 -p 9184 -d 2 - /// dotnet run -p Examples.Console.csproj otlp -e "localhost:55680" + /// dotnet run -p Examples.Console.csproj otlp -e "localhost:4317" /// dotnet run -p Examples.Console.csproj zpages /// /// The above must be run from the project root folder @@ -119,7 +119,7 @@ internal class OpenTracingShimOptions [Verb("otlp", HelpText = "Specify the options required to test OpenTelemetry Protocol (OTLP)")] internal class OtlpOptions { - [Option('e', "endpoint", HelpText = "Target to which the exporter is going to send traces or metrics", Default = "http://localhost:55680")] + [Option('e', "endpoint", HelpText = "Target to which the exporter is going to send traces or metrics", Default = "http://localhost:4317")] public string Endpoint { get; set; } } diff --git a/examples/Console/TestOtlpExporter.cs b/examples/Console/TestOtlpExporter.cs index 656e5ba06e2..d8336cc9dab 100644 --- a/examples/Console/TestOtlpExporter.cs +++ b/examples/Console/TestOtlpExporter.cs @@ -33,10 +33,10 @@ internal static object Run(string endpoint) * launch the OpenTelemetry Collector with an OTLP receiver, by running: * * - On Unix based systems use: - * docker run --rm -it -p 55680:55680 -v $(pwd):/cfg otel/opentelemetry-collector:0.14.0 --config=/cfg/otlp-collector-example/config.yaml + * docker run --rm -it -p 4317:4317 -v $(pwd):/cfg otel/opentelemetry-collector:0.19.0 --config=/cfg/otlp-collector-example/config.yaml * * - On Windows use: - * docker run --rm -it -p 55680:55680 -v "%cd%":/cfg otel/opentelemetry-collector:0.14.0 --config=/cfg/otlp-collector-example/config.yaml + * docker run --rm -it -p 4317:4317 -v "%cd%":/cfg otel/opentelemetry-collector:0.19.0 --config=/cfg/otlp-collector-example/config.yaml * * Open another terminal window at the examples/Console/ directory and * launch the OTLP example by running: diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md index a4055b354f4..ccf1875a09b 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md @@ -5,6 +5,7 @@ * Moved `OtlpTraceExporter` and `OtlpExporterOptions` classes to `OpenTelemetry.Exporter` namespace. ([#1770](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1770)) +* Changed default port for OTLP Exporter from 55680 to 4317 ## 1.0.0-rc2 diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs index 73898c0a526..28bfa2b5865 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs @@ -34,13 +34,13 @@ public class OtlpExporterOptions /// Gets or sets the target to which the exporter is going to send traces or metrics. /// The valid syntax is described at https://github.com/grpc/grpc/blob/master/doc/naming.md. /// - public Uri Endpoint { get; set; } = new Uri("http://localhost:55680"); + public Uri Endpoint { get; set; } = new Uri("http://localhost:4317"); #else /// /// Gets or sets the target to which the exporter is going to send traces or metrics. /// The valid syntax is described at https://github.com/grpc/grpc/blob/master/doc/naming.md. /// - public string Endpoint { get; set; } = "localhost:55680"; + public string Endpoint { get; set; } = "localhost:4317"; #endif #if NETSTANDARD2_1 diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpTraceExporterHelperExtensions.cs b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpTraceExporterHelperExtensions.cs index f4903d79984..c8ad06d0ecf 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpTraceExporterHelperExtensions.cs +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpTraceExporterHelperExtensions.cs @@ -30,7 +30,6 @@ public static class OtlpTraceExporterHelperExtensions /// builder to use. /// Exporter configuration options. /// The instance of to chain the calls. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Reliability", "CA2000:Dispose objects before losing scope", Justification = "The objects should not be disposed.")] public static TracerProviderBuilder AddOtlpExporter(this TracerProviderBuilder builder, Action configure = null) { if (builder == null) diff --git a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/docker-compose.yml b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/docker-compose.yml index 5e7aee9b690..094695190cb 100644 --- a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/docker-compose.yml +++ b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/docker-compose.yml @@ -11,7 +11,7 @@ services: - ./test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests:/cfg command: --config=/cfg/config.yaml ports: - - "55680:55680" + - "4317:4317" tests: build: @@ -19,6 +19,6 @@ services: dockerfile: ./test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/Dockerfile command: --TestCaseFilter:CategoryName=CollectorIntegrationTests environment: - - OTEL_EXPORTER_OTLP_ENDPOINT=otel-collector:55680 + - OTEL_EXPORTER_OTLP_ENDPOINT=otel-collector:4317 depends_on: - otel-collector