Skip to content

Commit

Permalink
[CartService] - Add Host Detector (#1415)
Browse files Browse the repository at this point in the history
* Add Host Detector

* changelog

---------

Co-authored-by: Austin Parker <[email protected]>
  • Loading branch information
julianocosta89 and austinlparker authored Feb 27, 2024
1 parent 940dfca commit b1e26c3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ the release.

## Unreleased

* [checkoutservice] add producer interceptor for tracing
([#1400](https://github.com/open-telemetry/opentelemetry-demo/pull/1400))
* [chore] increase memory for Collector and Jaeger
([#1396](https://github.com/open-telemetry/opentelemetry-demo/pull/1396))
* [chore] fix Make targets for restart and redeploy
([#1397](https://github.com/open-telemetry/opentelemetry-demo/pull/1397))
* [chore] add nightly releases
([#1398](https://github.com/open-telemetry/opentelemetry-demo/pull/1398))
* [chore] remove unused integration test
([#1406](https://github.com/open-telemetry/opentelemetry-demo/pull/1406))
* [checkoutservice] add producer interceptor for tracing
([#1400](https://github.com/open-telemetry/opentelemetry-demo/pull/1400))
* [productcatalogservice] fix graceful shutdown issues
([#1402](https://github.com/open-telemetry/opentelemetry-demo/pull/1402))
* [chore] remove unused integration test
([#1406](https://github.com/open-telemetry/opentelemetry-demo/pull/1406))
* [CartService] - Add Host Detector
([#1415](https://github.com/open-telemetry/opentelemetry-demo/pull/1415))

## 1.8.0

Expand Down
4 changes: 3 additions & 1 deletion src/cartservice/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using OpenTelemetry.Logs;
using OpenTelemetry.Metrics;
using OpenTelemetry.ResourceDetectors.Container;
using OpenTelemetry.ResourceDetectors.Host;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;

Expand Down Expand Up @@ -47,7 +48,8 @@

Action<ResourceBuilder> appResourceBuilder =
resource => resource
.AddDetector(new ContainerResourceDetector());
.AddDetector(new ContainerResourceDetector())
.AddDetector(new HostDetector());

builder.Services.AddOpenTelemetry()
.ConfigureResource(appResourceBuilder)
Expand Down
1 change: 1 addition & 0 deletions src/cartservice/src/cartservice.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<PackageReference Include="OpenTelemetry.Instrumentation.StackExchangeRedis" Version="1.0.0-rc9.13" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.ResourceDetectors.Container" Version="1.0.0-beta.6" />
<PackageReference Include="OpenTelemetry.ResourceDetectors.Host" Version="0.1.0-alpha.2" />
<PackageReference Include="StackExchange.Redis" Version="2.7.17" />
</ItemGroup>

Expand Down

0 comments on commit b1e26c3

Please sign in to comment.