From 45828709ff536e8aafaf60aaa46b4717c0d70b82 Mon Sep 17 00:00:00 2001 From: Roger Johansson Date: Wed, 11 Oct 2023 17:49:58 +0200 Subject: [PATCH] update otel to 1.6.0 (#2064) * update otel to 1.6.0 * fix build issues --- benchmarks/AutoClusterBenchmark/AutoClusterBenchmark.csproj | 2 +- benchmarks/ClusterBenchmark/ClusterBenchmark.csproj | 2 +- benchmarks/SkyriseMini/Client/SkyriseMiniClient.csproj | 4 ++-- benchmarks/SkyriseMini/Server/SkyriseMiniServer.csproj | 4 ++-- examples/ActorMetrics/ActorMetrics.csproj | 2 +- examples/ActorMetrics/Startup.cs | 3 ++- src/Proto.OpenTelemetry/Proto.OpenTelemetry.csproj | 4 ++-- tests/Proto.Cluster.Tests/ClusterFixture.cs | 3 ++- tests/Proto.Cluster.Tests/GithubActionsReporter.cs | 2 ++ tests/Proto.Cluster.Tests/Proto.Cluster.Tests.csproj | 6 +++--- .../Proto.OpenTelemetry.Tests.csproj | 2 +- 11 files changed, 19 insertions(+), 15 deletions(-) diff --git a/benchmarks/AutoClusterBenchmark/AutoClusterBenchmark.csproj b/benchmarks/AutoClusterBenchmark/AutoClusterBenchmark.csproj index 7594d5ec64..5bf2b5f32e 100644 --- a/benchmarks/AutoClusterBenchmark/AutoClusterBenchmark.csproj +++ b/benchmarks/AutoClusterBenchmark/AutoClusterBenchmark.csproj @@ -29,7 +29,7 @@ - + diff --git a/benchmarks/ClusterBenchmark/ClusterBenchmark.csproj b/benchmarks/ClusterBenchmark/ClusterBenchmark.csproj index 71f64f16eb..6d9476b863 100644 --- a/benchmarks/ClusterBenchmark/ClusterBenchmark.csproj +++ b/benchmarks/ClusterBenchmark/ClusterBenchmark.csproj @@ -24,7 +24,7 @@ - + diff --git a/benchmarks/SkyriseMini/Client/SkyriseMiniClient.csproj b/benchmarks/SkyriseMini/Client/SkyriseMiniClient.csproj index 8bfa93b0c2..3094eae7fc 100644 --- a/benchmarks/SkyriseMini/Client/SkyriseMiniClient.csproj +++ b/benchmarks/SkyriseMini/Client/SkyriseMiniClient.csproj @@ -22,8 +22,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/benchmarks/SkyriseMini/Server/SkyriseMiniServer.csproj b/benchmarks/SkyriseMini/Server/SkyriseMiniServer.csproj index 59b50b00ce..cfcdde1a31 100644 --- a/benchmarks/SkyriseMini/Server/SkyriseMiniServer.csproj +++ b/benchmarks/SkyriseMini/Server/SkyriseMiniServer.csproj @@ -22,8 +22,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/examples/ActorMetrics/ActorMetrics.csproj b/examples/ActorMetrics/ActorMetrics.csproj index 69d4ae726f..667488ac42 100644 --- a/examples/ActorMetrics/ActorMetrics.csproj +++ b/examples/ActorMetrics/ActorMetrics.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/examples/ActorMetrics/Startup.cs b/examples/ActorMetrics/Startup.cs index 73f13ad9d1..7c68c3fc09 100644 --- a/examples/ActorMetrics/Startup.cs +++ b/examples/ActorMetrics/Startup.cs @@ -29,11 +29,12 @@ public void ConfigureServices(IServiceCollection services) c.SwaggerDoc("v1", new OpenApiInfo { Title = "WebApplication1", Version = "v1" }); }); - services.AddOpenTelemetryMetrics(b => b + services.AddOpenTelemetry().WithMetrics(b => b .AddProtoActorInstrumentation() .AddAspNetCoreInstrumentation() .AddPrometheusExporter(prom => prom.ScrapeResponseCacheDurationMilliseconds = 1000) ); + RunDummyCluster.Run(); } diff --git a/src/Proto.OpenTelemetry/Proto.OpenTelemetry.csproj b/src/Proto.OpenTelemetry/Proto.OpenTelemetry.csproj index 6cb00f860b..b1db379ff8 100644 --- a/src/Proto.OpenTelemetry/Proto.OpenTelemetry.csproj +++ b/src/Proto.OpenTelemetry/Proto.OpenTelemetry.csproj @@ -5,8 +5,8 @@ 10 - - + + diff --git a/tests/Proto.Cluster.Tests/ClusterFixture.cs b/tests/Proto.Cluster.Tests/ClusterFixture.cs index f0fe6808c8..d4c0ef7141 100644 --- a/tests/Proto.Cluster.Tests/ClusterFixture.cs +++ b/tests/Proto.Cluster.Tests/ClusterFixture.cs @@ -9,6 +9,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using OpenTelemetry; +using OpenTelemetry.Exporter; using OpenTelemetry.Logs; using OpenTelemetry.Resources; using OpenTelemetry.Trace; @@ -223,7 +224,7 @@ private static void InitOpenTelemetryTracing() { options .SetResourceBuilder(builder) - .AddOtlpExporter(o => + .AddOtlpExporter( (OtlpExporterOptions o) => { o.Endpoint = endpoint; o.ExportProcessorType = ExportProcessorType.Batch; diff --git a/tests/Proto.Cluster.Tests/GithubActionsReporter.cs b/tests/Proto.Cluster.Tests/GithubActionsReporter.cs index 21f5941517..15ce34e06f 100644 --- a/tests/Proto.Cluster.Tests/GithubActionsReporter.cs +++ b/tests/Proto.Cluster.Tests/GithubActionsReporter.cs @@ -13,7 +13,9 @@ namespace Proto.Cluster.Tests; public class GithubActionsReporter { private readonly string _reportName; +#pragma warning disable CS0618 // Type or member is obsolete private static readonly ILogger Logger = Log.CreateLogger(); +#pragma warning restore CS0618 // Type or member is obsolete public const string ActivitySourceName = "Proto.Cluster.Tests"; private static readonly ActivitySource ActivitySource = new(ActivitySourceName); diff --git a/tests/Proto.Cluster.Tests/Proto.Cluster.Tests.csproj b/tests/Proto.Cluster.Tests/Proto.Cluster.Tests.csproj index bf591f3595..2ed5a9d1cf 100644 --- a/tests/Proto.Cluster.Tests/Proto.Cluster.Tests.csproj +++ b/tests/Proto.Cluster.Tests/Proto.Cluster.Tests.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/tests/Proto.OpenTelemetry.Tests/Proto.OpenTelemetry.Tests.csproj b/tests/Proto.OpenTelemetry.Tests/Proto.OpenTelemetry.Tests.csproj index 3233b6efeb..3679eea088 100644 --- a/tests/Proto.OpenTelemetry.Tests/Proto.OpenTelemetry.Tests.csproj +++ b/tests/Proto.OpenTelemetry.Tests/Proto.OpenTelemetry.Tests.csproj @@ -13,7 +13,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive