diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 862a81b8db..06895f443d 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -30,6 +30,7 @@ "globaltool", "icerpc", "Idempotency", + "jaegertracing", "localizable", "Memberwise", "meteo", diff --git a/examples/protobuf/Telemetry/Client/Client.csproj b/examples/protobuf/Telemetry/Client/Client.csproj index 1869043eae..bbe73172b5 100644 --- a/examples/protobuf/Telemetry/Client/Client.csproj +++ b/examples/protobuf/Telemetry/Client/Client.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/examples/protobuf/Telemetry/Client/Program.cs b/examples/protobuf/Telemetry/Client/Program.cs index 5847ee2c88..54d9c98468 100644 --- a/examples/protobuf/Telemetry/Client/Program.cs +++ b/examples/protobuf/Telemetry/Client/Program.cs @@ -12,11 +12,11 @@ using var activitySource = new ActivitySource("IceRpc"); // Configure OpenTelemetry trace provider to subscribe to the activity source used by the IceRpc telemetry interceptor, -// and to export the traces to the Zipkin service. +// and to export the traces using the OpenTelemetry Protocol (OTLP). using TracerProvider? tracerProvider = Sdk.CreateTracerProviderBuilder() .AddSource(activitySource.Name) .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("Greeter Client")) - .AddZipkinExporter() + .AddOtlpExporter() .Build(); // Load the test root CA certificate in order to connect to the server that uses a test server certificate. diff --git a/examples/protobuf/Telemetry/README.md b/examples/protobuf/Telemetry/README.md index c5adcec188..8f38ebdb0b 100644 --- a/examples/protobuf/Telemetry/README.md +++ b/examples/protobuf/Telemetry/README.md @@ -1,8 +1,9 @@ # Telemetry This application illustrates how to use the IceRPC telemetry interceptor and middleware, and how they can be integrated -with OpenTelemetry to export traces to Zipkin. The application also shows how the trace context is propagated from the -client to the server, by just configuring the IceRPC telemetry interceptor and middleware. +with OpenTelemetry to export traces over the OpenTelemetry Protocol (OTLP). The application also shows how the trace +context is propagated from the client to the server, by just configuring the IceRPC telemetry interceptor and +middleware. You can build the client and server applications with: @@ -10,9 +11,13 @@ You can build the client and server applications with: dotnet build ``` -First start the Zipkin service as documented in the Zipkin quick start guide: +The example sends traces to an OTLP endpoint at `http://localhost:4317` (the default for `AddOtlpExporter`). Any +OTLP-compatible collector or backend works; the simplest option is the Jaeger v2 single-binary container, which +natively accepts OTLP and provides a web UI: -- [Zipkin quick-start](https://zipkin.io/pages/quickstart.html) +```shell +docker run --rm --name jaeger -p 4317:4317 -p 16686:16686 jaegertracing/jaeger:2.17.0 +``` In a separate terminal start the Greeter Server program: @@ -28,8 +33,6 @@ cd Client dotnet run ``` -The trace information should now be available in the Zipkin local service: - -- +The trace information should now be available in the Jaeger UI: -![Zipkin](./zipkin.png) +- diff --git a/examples/protobuf/Telemetry/Server/Program.cs b/examples/protobuf/Telemetry/Server/Program.cs index 8eaab37816..25dd48fe1b 100644 --- a/examples/protobuf/Telemetry/Server/Program.cs +++ b/examples/protobuf/Telemetry/Server/Program.cs @@ -13,11 +13,11 @@ using var activitySource = new ActivitySource("IceRpc"); // Configure OpenTelemetry trace provider to subscribe to the activity source used by the IceRPC telemetry middleware, -// and to export the traces to the Zipkin service. +// and to export the traces using the OpenTelemetry Protocol (OTLP). using TracerProvider? tracerProvider = Sdk.CreateTracerProviderBuilder() .AddSource(activitySource.Name) .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("Greeter Server")) - .AddZipkinExporter() + .AddOtlpExporter() .Build(); // The default transport (QUIC) requires a server certificate. We use a test certificate here. diff --git a/examples/protobuf/Telemetry/Server/Server.csproj b/examples/protobuf/Telemetry/Server/Server.csproj index 9e97ca05e7..55693c3a58 100644 --- a/examples/protobuf/Telemetry/Server/Server.csproj +++ b/examples/protobuf/Telemetry/Server/Server.csproj @@ -15,7 +15,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/examples/protobuf/Telemetry/zipkin.png b/examples/protobuf/Telemetry/zipkin.png deleted file mode 100644 index 50678df3fc..0000000000 Binary files a/examples/protobuf/Telemetry/zipkin.png and /dev/null differ diff --git a/examples/slice/Telemetry/Client/Client.csproj b/examples/slice/Telemetry/Client/Client.csproj index 65370d5026..3a315496c7 100644 --- a/examples/slice/Telemetry/Client/Client.csproj +++ b/examples/slice/Telemetry/Client/Client.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/examples/slice/Telemetry/Client/Program.cs b/examples/slice/Telemetry/Client/Program.cs index 52c82b7003..2160abb831 100644 --- a/examples/slice/Telemetry/Client/Program.cs +++ b/examples/slice/Telemetry/Client/Program.cs @@ -12,11 +12,11 @@ using var activitySource = new ActivitySource("IceRpc"); // Configure OpenTelemetry trace provider to subscribe to the activity source used by the IceRpc telemetry interceptor, -// and to export the traces to the Zipkin service. +// and to export the traces using the OpenTelemetry Protocol (OTLP). using TracerProvider? tracerProvider = Sdk.CreateTracerProviderBuilder() .AddSource(activitySource.Name) .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("Greeter Client")) - .AddZipkinExporter() + .AddOtlpExporter() .Build(); // Load the test root CA certificate in order to connect to the server that uses a test server certificate. diff --git a/examples/slice/Telemetry/README.md b/examples/slice/Telemetry/README.md index c5adcec188..8f38ebdb0b 100644 --- a/examples/slice/Telemetry/README.md +++ b/examples/slice/Telemetry/README.md @@ -1,8 +1,9 @@ # Telemetry This application illustrates how to use the IceRPC telemetry interceptor and middleware, and how they can be integrated -with OpenTelemetry to export traces to Zipkin. The application also shows how the trace context is propagated from the -client to the server, by just configuring the IceRPC telemetry interceptor and middleware. +with OpenTelemetry to export traces over the OpenTelemetry Protocol (OTLP). The application also shows how the trace +context is propagated from the client to the server, by just configuring the IceRPC telemetry interceptor and +middleware. You can build the client and server applications with: @@ -10,9 +11,13 @@ You can build the client and server applications with: dotnet build ``` -First start the Zipkin service as documented in the Zipkin quick start guide: +The example sends traces to an OTLP endpoint at `http://localhost:4317` (the default for `AddOtlpExporter`). Any +OTLP-compatible collector or backend works; the simplest option is the Jaeger v2 single-binary container, which +natively accepts OTLP and provides a web UI: -- [Zipkin quick-start](https://zipkin.io/pages/quickstart.html) +```shell +docker run --rm --name jaeger -p 4317:4317 -p 16686:16686 jaegertracing/jaeger:2.17.0 +``` In a separate terminal start the Greeter Server program: @@ -28,8 +33,6 @@ cd Client dotnet run ``` -The trace information should now be available in the Zipkin local service: - -- +The trace information should now be available in the Jaeger UI: -![Zipkin](./zipkin.png) +- diff --git a/examples/slice/Telemetry/Server/Program.cs b/examples/slice/Telemetry/Server/Program.cs index 5748d722a9..a9a995b9c1 100644 --- a/examples/slice/Telemetry/Server/Program.cs +++ b/examples/slice/Telemetry/Server/Program.cs @@ -13,11 +13,11 @@ using var activitySource = new ActivitySource("IceRpc"); // Configure OpenTelemetry trace provider to subscribe to the activity source used by the IceRPC telemetry middleware, -// and to export the traces to the Zipkin service. +// and to export the traces using the OpenTelemetry Protocol (OTLP). using TracerProvider? tracerProvider = Sdk.CreateTracerProviderBuilder() .AddSource(activitySource.Name) .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("Greeter Server")) - .AddZipkinExporter() + .AddOtlpExporter() .Build(); // The default transport (QUIC) requires a server certificate. We use a test certificate here. diff --git a/examples/slice/Telemetry/Server/Server.csproj b/examples/slice/Telemetry/Server/Server.csproj index c4e8e98749..ec9ee66434 100644 --- a/examples/slice/Telemetry/Server/Server.csproj +++ b/examples/slice/Telemetry/Server/Server.csproj @@ -15,7 +15,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/examples/slice/Telemetry/zipkin.png b/examples/slice/Telemetry/zipkin.png deleted file mode 100644 index 520eb98c5f..0000000000 Binary files a/examples/slice/Telemetry/zipkin.png and /dev/null differ