diff --git a/examples/runtime-instrumentation/Program.cs b/examples/runtime-instrumentation/Program.cs index b4bdd9fc56..9131aa652c 100644 --- a/examples/runtime-instrumentation/Program.cs +++ b/examples/runtime-instrumentation/Program.cs @@ -23,11 +23,7 @@ public static void Main() { using var meterProvider = Sdk.CreateMeterProviderBuilder() .AddRuntimeInstrumentation() - .AddPrometheusExporter(options => - { - options.StartHttpListener = true; - options.ScrapeResponseCacheDurationMilliseconds = 0; - }) + .AddPrometheusHttpListener() .Build(); // Most of the process.runtime.dotnet.gc.* metrics are only available after the GC finished at least one collection. diff --git a/examples/runtime-instrumentation/runtime-instrumentation.csproj b/examples/runtime-instrumentation/runtime-instrumentation.csproj index eb026e5dca..3531e02f48 100644 --- a/examples/runtime-instrumentation/runtime-instrumentation.csproj +++ b/examples/runtime-instrumentation/runtime-instrumentation.csproj @@ -6,7 +6,7 @@ enable - +