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)