From 75293461f994fecd4784df1dad4b1587e2e60efa Mon Sep 17 00:00:00 2001 From: Hannah Chan Date: Tue, 17 May 2022 23:07:01 +1000 Subject: [PATCH 1/9] Spike --- ...eusExporterApplicationBuilderExtensions.cs | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs index ef96f4722f8..12569ec48f5 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs +++ b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs @@ -18,6 +18,7 @@ using System; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using OpenTelemetry.Exporter; using OpenTelemetry.Exporter.Prometheus; @@ -149,6 +150,52 @@ public static IApplicationBuilder UseOpenTelemetryPrometheusScrapingEndpoint( builder.UseMiddleware(meterProvider); }); } + + /// + /// Adds OpenTelemetry Prometheus scraping endpoint middleware to an + /// instance. + /// + /// The to add + /// middleware to. + /// Optional path to use for the branched pipeline. + /// Optional + /// containing a otherwise the primary + /// SDK provider will be resolved using application services. + /// Optional callback to + /// configure the branched pipeline. Called before registration of the + /// Prometheus middleware. + /// A convention routes for the Prometheus scraping endpoint. + public static IEndpointConventionBuilder MapPrometheusScrapingEndpoint( + this IEndpointRouteBuilder endpoints, + string path = null, + MeterProvider meterProvider = null, + Action configureBranchedPipeline = null) + { + var builder = endpoints.CreateApplicationBuilder(); + + // Note: Order is important here. MeterProvider is accessed before + // GetOptions so that any changes made to + // PrometheusExporterOptions in deferred AddPrometheusExporter + // configure actions are reflected. + meterProvider ??= builder.ApplicationServices.GetRequiredService(); + + if (path == null) + { + var options = builder.ApplicationServices.GetOptions(); + path = options.ScrapeEndpointPath ?? PrometheusExporterOptions.DefaultScrapeEndpointPath; + } + + if (!path.StartsWith("/")) + { + path = $"/{path}"; + } + + configureBranchedPipeline?.Invoke(builder); + + builder.UseMiddleware(meterProvider); + + return endpoints.Map(new PathString(path), builder.Build()); + } } } #endif From b6af4dde62d8a53a9f8baa55d1f92f25a2f27c96 Mon Sep 17 00:00:00 2001 From: Hannah Chan Date: Sat, 21 May 2022 20:29:58 +1000 Subject: [PATCH 2/9] Revision --- ...eusExporterApplicationBuilderExtensions.cs | 46 ----------- ...sExporterEndpointRouteBuilderExtensions.cs | 82 +++++++++++++++++++ 2 files changed, 82 insertions(+), 46 deletions(-) create mode 100644 src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs diff --git a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs index 12569ec48f5..c44ff522070 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs +++ b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs @@ -150,52 +150,6 @@ public static IApplicationBuilder UseOpenTelemetryPrometheusScrapingEndpoint( builder.UseMiddleware(meterProvider); }); } - - /// - /// Adds OpenTelemetry Prometheus scraping endpoint middleware to an - /// instance. - /// - /// The to add - /// middleware to. - /// Optional path to use for the branched pipeline. - /// Optional - /// containing a otherwise the primary - /// SDK provider will be resolved using application services. - /// Optional callback to - /// configure the branched pipeline. Called before registration of the - /// Prometheus middleware. - /// A convention routes for the Prometheus scraping endpoint. - public static IEndpointConventionBuilder MapPrometheusScrapingEndpoint( - this IEndpointRouteBuilder endpoints, - string path = null, - MeterProvider meterProvider = null, - Action configureBranchedPipeline = null) - { - var builder = endpoints.CreateApplicationBuilder(); - - // Note: Order is important here. MeterProvider is accessed before - // GetOptions so that any changes made to - // PrometheusExporterOptions in deferred AddPrometheusExporter - // configure actions are reflected. - meterProvider ??= builder.ApplicationServices.GetRequiredService(); - - if (path == null) - { - var options = builder.ApplicationServices.GetOptions(); - path = options.ScrapeEndpointPath ?? PrometheusExporterOptions.DefaultScrapeEndpointPath; - } - - if (!path.StartsWith("/")) - { - path = $"/{path}"; - } - - configureBranchedPipeline?.Invoke(builder); - - builder.UseMiddleware(meterProvider); - - return endpoints.Map(new PathString(path), builder.Build()); - } } } #endif diff --git a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs new file mode 100644 index 00000000000..59df65773bd --- /dev/null +++ b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs @@ -0,0 +1,82 @@ +// +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#if NETCOREAPP3_1_OR_GREATER + +using System; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.DependencyInjection; +using OpenTelemetry.Exporter; +using OpenTelemetry.Exporter.Prometheus; +using OpenTelemetry.Metrics; + +namespace Microsoft.AspNetCore.Builder +{ + /// + /// Provides extension methods for to add + /// Prometheus scraping endpoint. + /// + public static class PrometheusExporterEndpointRouteBuilderExtensions + { + /// + /// Adds OpenTelemetry Prometheus scraping endpoint middleware to an + /// instance. + /// + /// The to add + /// middleware to. + /// Optional path to use for the branched pipeline. + /// Optional + /// containing a otherwise the primary + /// SDK provider will be resolved using application services. + /// Optional callback to + /// configure the branched pipeline. Called before registration of the + /// Prometheus middleware. + /// A convention routes for the Prometheus scraping endpoint. + public static IEndpointConventionBuilder MapPrometheusScrapingEndpoint( + this IEndpointRouteBuilder endpoints, + string path = null, + MeterProvider meterProvider = null, + Action configureBranchedPipeline = null) + { + var builder = endpoints.CreateApplicationBuilder(); + + // Note: Order is important here. MeterProvider is accessed before + // GetOptions so that any changes made to + // PrometheusExporterOptions in deferred AddPrometheusExporter + // configure actions are reflected. + meterProvider ??= builder.ApplicationServices.GetRequiredService(); + + if (path == null) + { + var options = builder.ApplicationServices.GetOptions(); + path = options.ScrapeEndpointPath ?? PrometheusExporterOptions.DefaultScrapeEndpointPath; + } + + if (!path.StartsWith("/")) + { + path = $"/{path}"; + } + + configureBranchedPipeline?.Invoke(builder); + + builder.UseMiddleware(meterProvider); + + return endpoints.Map(new PathString(path), builder.Build()); + } + } +} +#endif From 412c95b680add286a047c1d78fb791034fc98e9b Mon Sep 17 00:00:00 2001 From: Hannah Chan Date: Sat, 21 May 2022 20:30:18 +1000 Subject: [PATCH 3/9] Revision --- .../PrometheusExporterApplicationBuilderExtensions.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs index c44ff522070..ef96f4722f8 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs +++ b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterApplicationBuilderExtensions.cs @@ -18,7 +18,6 @@ using System; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using OpenTelemetry.Exporter; using OpenTelemetry.Exporter.Prometheus; From 86ae8a42997c2f2b1481524e67372292ad41c8a4 Mon Sep 17 00:00:00 2001 From: Hannah Chan Date: Sat, 21 May 2022 21:00:11 +1000 Subject: [PATCH 4/9] Add Unit Tests --- .../PrometheusExporterMiddlewareTests.cs | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/test/OpenTelemetry.Exporter.Prometheus.Tests/PrometheusExporterMiddlewareTests.cs b/test/OpenTelemetry.Exporter.Prometheus.Tests/PrometheusExporterMiddlewareTests.cs index 619c8b6c3d8..a11ea430423 100644 --- a/test/OpenTelemetry.Exporter.Prometheus.Tests/PrometheusExporterMiddlewareTests.cs +++ b/test/OpenTelemetry.Exporter.Prometheus.Tests/PrometheusExporterMiddlewareTests.cs @@ -167,6 +167,42 @@ public Task PrometheusExporterMiddlewareIntegration_NoMetrics() skipMetrics: true); } + [Fact] + public Task PrometheusExporterMiddlewareIntegration_MapEndpoint() + { + return RunPrometheusExporterMiddlewareIntegrationTest( + "/metrics", + app => app.UseRouting().UseEndpoints(builder => builder.MapPrometheusScrapingEndpoint()), + services => services.AddRouting()); + } + + [Fact] + public Task PrometheusExporterMiddlewareIntegration_MapEndpoint_WithPathOverride() + { + return RunPrometheusExporterMiddlewareIntegrationTest( + "/metrics_path", + app => app.UseRouting().UseEndpoints(builder => builder.MapPrometheusScrapingEndpoint("metrics_path")), + services => services.AddRouting()); + } + + [Fact] + public async Task PrometheusExporterMiddlewareIntegration_MapEndpoint_WithMeterProvider() + { + using MeterProvider meterProvider = Sdk.CreateMeterProviderBuilder() + .AddMeter(MeterName) + .AddPrometheusExporter() + .Build(); + + await RunPrometheusExporterMiddlewareIntegrationTest( + "/metrics", + app => app.UseRouting().UseEndpoints(builder => builder.MapPrometheusScrapingEndpoint( + path: null, + meterProvider: meterProvider, + configureBranchedPipeline: null)), + services => services.AddRouting(), + registerMeterProvider: false).ConfigureAwait(false); + } + private static async Task RunPrometheusExporterMiddlewareIntegrationTest( string path, Action configure, From 33d9f22ead94239f1507f8f987d8234b171f6a85 Mon Sep 17 00:00:00 2001 From: Hannah Chan Date: Tue, 24 May 2022 22:24:52 +1000 Subject: [PATCH 5/9] Add overloads and improved documentation comments --- ...sExporterEndpointRouteBuilderExtensions.cs | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs index 59df65773bd..46dcc922147 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs +++ b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs @@ -36,9 +36,35 @@ public static class PrometheusExporterEndpointRouteBuilderExtensions /// Adds OpenTelemetry Prometheus scraping endpoint middleware to an /// instance. /// + /// Note: A branched pipeline is created for the route + /// specified by . /// The to add /// middleware to. - /// Optional path to use for the branched pipeline. + /// A convention routes for the Prometheus scraping endpoint. + public static IEndpointConventionBuilder MapPrometheusScrapingEndpoint(this IEndpointRouteBuilder endpoints) + => MapPrometheusScrapingEndpoint(endpoints, path: null, meterProvider: null, configureBranchedPipeline: null); + + /// + /// Adds OpenTelemetry Prometheus scraping endpoint middleware to an + /// instance. + /// + /// The to add + /// middleware to. + /// The path to use for the branched pipeline. + /// A convention routes for the Prometheus scraping endpoint. + public static IEndpointConventionBuilder MapPrometheusScrapingEndpoint(this IEndpointRouteBuilder endpoints, string path) + => MapPrometheusScrapingEndpoint(endpoints, path, meterProvider: null, configureBranchedPipeline: null); + + /// + /// Adds OpenTelemetry Prometheus scraping endpoint middleware to an + /// instance. + /// + /// The to add + /// middleware to. + /// Optional path to use for the branched pipeline. + /// If not provided then + /// is used. /// Optional /// containing a otherwise the primary /// SDK provider will be resolved using application services. From 9b08975c507a39bfc057625de7caf891ab09c7ab Mon Sep 17 00:00:00 2001 From: Hannah Chan Date: Wed, 25 May 2022 17:16:54 +1000 Subject: [PATCH 6/9] Add null guard --- .../PrometheusExporterEndpointRouteBuilderExtensions.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs index 46dcc922147..bcc394560a9 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs +++ b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs @@ -22,6 +22,7 @@ using Microsoft.Extensions.DependencyInjection; using OpenTelemetry.Exporter; using OpenTelemetry.Exporter.Prometheus; +using OpenTelemetry.Internal; using OpenTelemetry.Metrics; namespace Microsoft.AspNetCore.Builder @@ -54,7 +55,10 @@ public static IEndpointConventionBuilder MapPrometheusScrapingEndpoint(this IEnd /// The path to use for the branched pipeline. /// A convention routes for the Prometheus scraping endpoint. public static IEndpointConventionBuilder MapPrometheusScrapingEndpoint(this IEndpointRouteBuilder endpoints, string path) - => MapPrometheusScrapingEndpoint(endpoints, path, meterProvider: null, configureBranchedPipeline: null); + { + Guard.ThrowIfNull(path); + return MapPrometheusScrapingEndpoint(endpoints, path, meterProvider: null, configureBranchedPipeline: null); + } /// /// Adds OpenTelemetry Prometheus scraping endpoint middleware to an From 44446c0d80b5a44dc2d9dc372e1abc33ce1d7a78 Mon Sep 17 00:00:00 2001 From: Hannah Chan Date: Thu, 26 May 2022 21:37:23 +1000 Subject: [PATCH 7/9] Switch to `endpoints.ServiceProvider` --- .../PrometheusExporterEndpointRouteBuilderExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs index bcc394560a9..02b58a34201 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs +++ b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterEndpointRouteBuilderExtensions.cs @@ -88,11 +88,11 @@ public static IEndpointConventionBuilder MapPrometheusScrapingEndpoint( // GetOptions so that any changes made to // PrometheusExporterOptions in deferred AddPrometheusExporter // configure actions are reflected. - meterProvider ??= builder.ApplicationServices.GetRequiredService(); + meterProvider ??= endpoints.ServiceProvider.GetRequiredService(); if (path == null) { - var options = builder.ApplicationServices.GetOptions(); + var options = endpoints.ServiceProvider.GetOptions(); path = options.ScrapeEndpointPath ?? PrometheusExporterOptions.DefaultScrapeEndpointPath; } From 721ff33eeb15b9db4d73c76719b8b781f5eb6fe0 Mon Sep 17 00:00:00 2001 From: Hannah Chan Date: Fri, 27 May 2022 21:48:18 +1000 Subject: [PATCH 8/9] Update Change Log and PublicAPI --- .../.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt | 5 ++++- src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt index 340bdb69a7f..197442933dc 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt @@ -20,4 +20,7 @@ static Microsoft.AspNetCore.Builder.PrometheusExporterApplicationBuilderExtensio static Microsoft.AspNetCore.Builder.PrometheusExporterApplicationBuilderExtensions.UseOpenTelemetryPrometheusScrapingEndpoint(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, OpenTelemetry.Metrics.MeterProvider meterProvider, System.Func predicate, string path, System.Action configureBranchedPipeline) -> Microsoft.AspNetCore.Builder.IApplicationBuilder static Microsoft.AspNetCore.Builder.PrometheusExporterApplicationBuilderExtensions.UseOpenTelemetryPrometheusScrapingEndpoint(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string path) -> Microsoft.AspNetCore.Builder.IApplicationBuilder static Microsoft.AspNetCore.Builder.PrometheusExporterApplicationBuilderExtensions.UseOpenTelemetryPrometheusScrapingEndpoint(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Func predicate) -> Microsoft.AspNetCore.Builder.IApplicationBuilder -static OpenTelemetry.Metrics.PrometheusExporterMeterProviderBuilderExtensions.AddPrometheusExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Action configure = null) -> OpenTelemetry.Metrics.MeterProviderBuilder \ No newline at end of file +static OpenTelemetry.Metrics.PrometheusExporterMeterProviderBuilderExtensions.AddPrometheusExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Action configure = null) -> OpenTelemetry.Metrics.MeterProviderBuilder +static Microsoft.AspNetCore.Builder.PrometheusExporterEndpointRouteBuilderExtensions.MapPrometheusScrapingEndpoint(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder +static Microsoft.AspNetCore.Builder.PrometheusExporterEndpointRouteBuilderExtensions.MapPrometheusScrapingEndpoint(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string path) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder +static Microsoft.AspNetCore.Builder.PrometheusExporterEndpointRouteBuilderExtensions.MapPrometheusScrapingEndpoint(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string path, OpenTelemetry.Metrics.MeterProvider meterProvider, System.Action configureBranchedPipeline) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder diff --git a/src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md b/src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md index 12db71d8dd8..70154054f2b 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +* Added `IEndpointRouteBuilder` extension methods to help with Prometheus + middleware configuration on ASP.NET Core + ([#3295](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3295)) + ## 1.3.0-beta.2 Released 2022-May-16 From c6237864e94429f72cd8038d97c167514f281bf5 Mon Sep 17 00:00:00 2001 From: Hannah Chan Date: Sat, 4 Jun 2022 11:28:41 +1000 Subject: [PATCH 9/9] Fix PublicAPI.Unshipped.txt --- .../.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt index 197442933dc..0c45b3f187c 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt @@ -1,4 +1,5 @@ Microsoft.AspNetCore.Builder.PrometheusExporterApplicationBuilderExtensions +Microsoft.AspNetCore.Builder.PrometheusExporterEndpointRouteBuilderExtensions OpenTelemetry.Exporter.PrometheusExporter OpenTelemetry.Exporter.PrometheusExporter.Collect.get -> System.Func OpenTelemetry.Exporter.PrometheusExporter.Collect.set -> void @@ -23,4 +24,4 @@ static Microsoft.AspNetCore.Builder.PrometheusExporterApplicationBuilderExtensio static OpenTelemetry.Metrics.PrometheusExporterMeterProviderBuilderExtensions.AddPrometheusExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Action configure = null) -> OpenTelemetry.Metrics.MeterProviderBuilder static Microsoft.AspNetCore.Builder.PrometheusExporterEndpointRouteBuilderExtensions.MapPrometheusScrapingEndpoint(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder static Microsoft.AspNetCore.Builder.PrometheusExporterEndpointRouteBuilderExtensions.MapPrometheusScrapingEndpoint(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string path) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder -static Microsoft.AspNetCore.Builder.PrometheusExporterEndpointRouteBuilderExtensions.MapPrometheusScrapingEndpoint(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string path, OpenTelemetry.Metrics.MeterProvider meterProvider, System.Action configureBranchedPipeline) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder +static Microsoft.AspNetCore.Builder.PrometheusExporterEndpointRouteBuilderExtensions.MapPrometheusScrapingEndpoint(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string path = null, OpenTelemetry.Metrics.MeterProvider meterProvider = null, System.Action configureBranchedPipeline = null) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder