From dc551385458df296829801a9acb4c717f9cb0648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Tue, 18 Jun 2024 12:40:53 +0200 Subject: [PATCH] [demo/cartservice] Update documentation after 1.9.0 OTel .NET SDK release --- content/en/docs/demo/services/cart.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/en/docs/demo/services/cart.md b/content/en/docs/demo/services/cart.md index d325d9d6f74e..075f250e838c 100644 --- a/content/en/docs/demo/services/cart.md +++ b/content/en/docs/demo/services/cart.md @@ -25,8 +25,8 @@ and resource attributes is performed through environment variables. ```cs Action appResourceBuilder = resource => resource - .AddDetector(new ContainerResourceDetector()) - .AddDetector(new HostDetector()); + .AddContainerDetector() + .AddHostDetector(); builder.Services.AddOpenTelemetry() .ConfigureResource(appResourceBuilder) @@ -81,7 +81,8 @@ desired instrumentation libraries, exporters, etc. ```cs Action appResourceBuilder = resource => resource - .AddDetector(new ContainerResourceDetector()); + .AddContainerDetector() + .AddHostDetector(); builder.Services.AddOpenTelemetry() .ConfigureResource(appResourceBuilder)