diff --git a/.github/README.md b/.github/README.md
index e151cf3001..ff217cd81f 100644
--- a/.github/README.md
+++ b/.github/README.md
@@ -4,6 +4,7 @@
The following guide describes how to setup the OpenTelemetry demo with Elastic Observability using [Docker compose](#docker-compose) or [Kubernetes](#kubernetes). This fork introduces several changes to the agents used in the demo:
- The Java agent within the [Ad](../src/adservice/Dockerfile.elastic) and [Fraud Detection](../src/frauddetectionservice/Dockerfile.elastic) services have been replaced with the Elastic distribution of the OpenTelemetry Java Agent. You can find more information about the Elastic distribution in [this blog post](https://www.elastic.co/observability-labs/blog/elastic-distribution-opentelemetry-java-agent).
+- The .NET agent within the [Cart service](../src/cartservice/src/Directory.Build.props) has been replaced with the Elastic distribution of the OpenTelemetry .NET Agent. You can find more information about the Elastic distribution in [this blog post](https://www.elastic.co/observability-labs/blog/elastic-opentelemetry-distribution-dotnet-applications).
## Docker compose
diff --git a/src/cartservice/src/Directory.Build.props b/src/cartservice/src/Directory.Build.props
new file mode 100644
index 0000000000..1d66fc0829
--- /dev/null
+++ b/src/cartservice/src/Directory.Build.props
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/cartservice/src/Program.cs b/src/cartservice/src/Program.cs
index 41340845ed..051cdddd4d 100644
--- a/src/cartservice/src/Program.cs
+++ b/src/cartservice/src/Program.cs
@@ -12,6 +12,7 @@
using Microsoft.Extensions.Logging;
using OpenTelemetry.Instrumentation.StackExchangeRedis;
using OpenTelemetry.Logs;
+using OpenTelemetry;
using OpenTelemetry.Metrics;
using OpenTelemetry.ResourceDetectors.Container;
using OpenTelemetry.ResourceDetectors.Host;
@@ -30,7 +31,6 @@
}
builder.Logging
- .AddOpenTelemetry(options => options.AddOtlpExporter())
.AddConsole();
builder.Services.AddSingleton(x=>
@@ -65,15 +65,9 @@
.WithTracing(tracerBuilder => tracerBuilder
.AddRedisInstrumentation(
options => options.SetVerboseDatabaseStatements = true)
- .AddAspNetCoreInstrumentation()
- .AddGrpcClientInstrumentation()
- .AddHttpClientInstrumentation()
- .AddOtlpExporter())
+ .AddAspNetCoreInstrumentation())
.WithMetrics(meterBuilder => meterBuilder
- .AddProcessInstrumentation()
- .AddRuntimeInstrumentation()
- .AddAspNetCoreInstrumentation()
- .AddOtlpExporter());
+ .AddAspNetCoreInstrumentation());
OpenFeature.Api.Instance.AddHooks(new TracingHook());
builder.Services.AddGrpc();
builder.Services.AddGrpcHealthChecks()