Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
439fda6
add Dapr in the cartService
henrikrexed Apr 7, 2025
8f69852
Merge remote-tracking branch 'origin/main'
henrikrexed Apr 7, 2025
52d5f14
add Dapr in the cartService
henrikrexed Apr 7, 2025
41c970b
add Dapr in the cartService
henrikrexed Apr 7, 2025
e68a2e0
add Dapr in the cartService
henrikrexed Apr 7, 2025
c0bf516
add Dapr in the cartService
henrikrexed Apr 7, 2025
ae54b15
add Dapr in the cartService
henrikrexed Apr 7, 2025
163a15f
add Dapr in the cartService
henrikrexed Apr 7, 2025
0fda706
add Dapr in the cartService
henrikrexed Apr 7, 2025
7d433e1
add Dapr in the cartService
henrikrexed Apr 7, 2025
ea0bbdc
add Dapr in the cartService
henrikrexed Apr 7, 2025
ebcdfaf
add Dapr in the cartService
henrikrexed Apr 7, 2025
29aca73
add Dapr in the cartService
henrikrexed Apr 7, 2025
c94fea4
add Dapr in the cartService
henrikrexed Apr 7, 2025
0aa0c51
add Dapr in the cartService
henrikrexed Apr 7, 2025
702bc1d
add Dapr in the cartService
henrikrexed Apr 7, 2025
08ebf88
add Dapr in the cartService
henrikrexed Apr 7, 2025
7f62676
add Dapr in the cartService
henrikrexed Apr 7, 2025
a2df812
add Dapr in the cartService
henrikrexed Apr 7, 2025
477755e
add Dapr in the cartService
henrikrexed Apr 7, 2025
1993182
add Dapr in the cartService
henrikrexed Apr 7, 2025
4c81225
updated docker-compose.yaml and the changed the dapr configuraton;
henrikrexed Apr 8, 2025
0c029ee
added the change on the changelog.md
henrikrexed Apr 8, 2025
383de46
Update .env
henrikrexed Apr 8, 2025
4d5ac98
Remove the usage of a local file to a Postgresql database
henrikrexed Apr 8, 2025
826f35a
Update docker-compose.yml
henrikrexed Apr 8, 2025
6799038
issue in the docker compose .yaml
henrikrexed Apr 8, 2025
4b4ead1
Merge remote-tracking branch 'refs/remotes/fork/main'
henrikrexed Apr 8, 2025
8bee495
issue in the docker compose .yaml
henrikrexed Apr 8, 2025
ed67a05
update go.sum and go.mod
henrikrexed Apr 8, 2025
ac61fbb
update go.sum and go.mod
henrikrexed Apr 8, 2025
517c3c3
update go.sum and go.mod
henrikrexed Apr 8, 2025
68b2c33
update go.sum and go.mod
henrikrexed Apr 8, 2025
c95e233
update go.sum and go.mod
henrikrexed Apr 8, 2025
0480525
update go.sum and go.mod
henrikrexed Apr 8, 2025
5d8c3cb
update go.sum and go.mod
henrikrexed Apr 8, 2025
56666ad
update go.sum and go.mod & dockerfile, resolve compilation issues
henrikrexed Apr 9, 2025
dca7822
add go tidy in Dockerfile
henrikrexed Apr 9, 2025
bf7ad13
update go version in the dockerfile
henrikrexed Apr 9, 2025
940455e
update go version in the dockerfile
henrikrexed Apr 9, 2025
e067f45
update go version in the dockerfile
henrikrexed Apr 9, 2025
a042aca
change datamodel of the sql database to mach with stat api of DAPR.
henrikrexed Apr 10, 2025
c2b754d
resolve compilation issue
henrikrexed Apr 10, 2025
5dc1487
update the dapr query
henrikrexed Apr 10, 2025
4f96896
dapr runtime error
henrikrexed Apr 14, 2025
ad54dd9
dapr runtime error
henrikrexed Apr 14, 2025
8f4a312
add logging for debuggin price issue
henrikrexed Apr 14, 2025
ac3edf0
changing Unmarshal method
henrikrexed Apr 14, 2025
7774366
checking the parsing of the Money
henrikrexed Apr 14, 2025
a990281
Merge remote-tracking branch 'origin/main'
henrikrexed Apr 14, 2025
2e742eb
add change log and removed the produc.json file from the product-catalog
henrikrexed Apr 14, 2025
b87d9a1
Merge remote-tracking branch 'origin/main'
henrikrexed May 23, 2025
1219a15
add change log and removed the produc.json file from the product-catalog
henrikrexed May 23, 2025
7092d2e
resole the various checks in failure
henrikrexed May 23, 2025
d4d391f
resole the various checks in failure
henrikrexed May 23, 2025
9c8c8ca
resole the various checks in failure
henrikrexed May 23, 2025
a5c8a61
Merge branch 'main' into main
julianocosta89 May 26, 2025
678b73d
Fix product-catalog dockerfile
julianocosta89 May 26, 2025
3a5aa81
Merge branch 'open-telemetry:main' into main
henrikrexed May 26, 2025
e26db1e
Merge remote-tracking branch 'origin/main'
henrikrexed May 26, 2025
3644947
resolve build issue and docker-compose
henrikrexed May 26, 2025
494f800
resolve docker-compose yamlint issue
henrikrexed May 26, 2025
4f6f6d6
resolve docker-compose yamlint issue
henrikrexed May 26, 2025
41031c2
resolve docker-compose yamlint issue
henrikrexed May 26, 2025
de33703
Merge branch 'main' into main
julianocosta89 Jun 25, 2025
bec745c
Sanity check
julianocosta89 Jun 25, 2025
ba74f2d
Add license
julianocosta89 Jun 25, 2025
0a25bf2
Sanity and license
julianocosta89 Jun 25, 2025
b644130
Remove trailing space
julianocosta89 Jun 25, 2025
4759c4f
Merge branch 'main' into main
julianocosta89 Jun 26, 2025
d02507f
Merge branch 'main' into main
henrikrexed Jul 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .licenserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
"# Copyright The OpenTelemetry Authors",
"# SPDX-License-Identifier: Apache-2.0"
],

"**/*.sql": [
"-- Copyright The OpenTelemetry Authors",
"-- SPDX-License-Identifier: Apache-2.0"
],

"**/{Dockerfile,Makefile}": [
"# Copyright The OpenTelemetry Authors",
"# SPDX-License-Identifier: Apache-2.0"
Expand Down
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ the release.

## Unreleased


* [product catalog] use it with a Dapr client
([#2143](https://github.com/open-telemetry/opentelemetry-demo/pull/2143))
* [cartservice] Using Dapr to connect to valkey
([#2143](https://github.com/open-telemetry/opentelemetry-demo/pull/2143))
* [postgresl] added postgresql for product
([#2143](https://github.com/open-telemetry/opentelemetry-demo/pull/2143))

* [chore] add GOMEMLIMIT to all Go services
([#2148](https://github.com/open-telemetry/opentelemetry-demo/pull/2148))
* [product-catalog] Simplify span event name
Expand Down Expand Up @@ -44,6 +52,7 @@ the release.
* [flagd-ui] change image from alpine to distroless to reduce size
([#2224](https://github.com/open-telemetry/opentelemetry-demo/pull/2224))
* [load-generator] Update locustfile for logging with TraceContext

([#2265](https://github.com/open-telemetry/opentelemetry-demo/pull/2265))
* [product-catalog] Add OTel grpc Logs to Product Catalog
([#2285](https://github.com/open-telemetry/opentelemetry-demo/pull/2285))
Expand Down Expand Up @@ -85,12 +94,10 @@ the release.
fix for `IS_REMOTE` flag feature
([#2112](https://github.com/open-telemetry/opentelemetry-demo/pull/2112))
* [load-generator] Change OpenFeature Evaluation to Remote Evaluation Protocol,
based on [this issue in OpenFeature/python-sdk-contrib](https://github.com/open-feature/python-sdk-contrib/issues/198)
([this issue in OpenFeature/python-sdk-contrib](https://github.com/open-feature/python-sdk-contrib/issues/198))
([#2114](https://github.com/open-telemetry/opentelemetry-demo/pull/2114))
* [flagd-ui] increase memory to 100MB
([#2120](https://github.com/open-telemetry/opentelemetry-demo/pull/2120))
* [cartservice] change custom metrics to use seconds
([#2135](https://github.com/open-telemetry/opentelemetry-demo/pull/2135))

## 2.0.1

Expand Down
75 changes: 72 additions & 3 deletions docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,35 @@ services:
- OTEL_SERVICE_NAME=cart
- ASPNETCORE_URLS=http://*:${CART_PORT}
depends_on:
valkey-cart:
condition: service_started

otel-collector:
condition: service_started
logging: *logging

cart-dapr:
image: "daprio/daprd:edge"
container_name: cart-dapr
command: [
"./daprd",
"-app-id",
"cart",
"-app-port",
"${CART_PORT}",
"-placement-host-address",
"dapr-placement:50006",
"-components-path",
"/components",
"-config",
"/configuration/config.yaml"
]
volumes:
- "./src/dapr/components/:/components"
- "./src/dapr/:/configuration"
depends_on:
- cart
- valkey-cart
- dapr-placement
network_mode: "service:cart"
# Checkout service
checkout:
image: ${IMAGE_NAME}:${DEMO_VERSION}-checkout
Expand Down Expand Up @@ -382,6 +405,17 @@ services:
condition: service_started
logging: *logging

product_db:
image: postgres:15.3-alpine3.18
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres123
volumes:
- ./src/postgresql/product/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./src/postgresql/data:/var/lib/postgresql/data
ports:
- 5436:5432
# Product Catalog service
product-catalog:
image: ${IMAGE_NAME}:${DEMO_VERSION}-product-catalog
Expand Down Expand Up @@ -414,6 +448,33 @@ services:
condition: service_started
logging: *logging

product-dapr:
image: "daprio/daprd:edge"
container_name: product-dapr
command: [
"./daprd",
"-app-id",
"product-catalog",
"-app-port",
"${PRODUCT_CATALOG_PORT}",
"-placement-host-address",
"dapr-placement:50006",
"-resources-path",
"/configuration/config.yaml",
"-config",
"/dapr/config.yaml"
]
volumes:
- "./src/dapr/components/:/components"
- "./src/dapr/:/configuration"
depends_on:
product_db:
condition: service_started
dapr-placement:
condition: service_started
logging: *logging
network_mode: "service:product-catalog"

# Quote service
quote:
image: ${IMAGE_NAME}:${DEMO_VERSION}-quote
Expand Down Expand Up @@ -552,7 +613,15 @@ services:
- "${VALKEY_PORT}"
logging: *logging


# ********************
# Dapr Components
# ********************
dapr-placement:
image: "daprio/dapr"
container_name: dapr-placement
command: [ "./placement", "-port", "50006" ]
ports:
- "50006:50006"
# ********************
# Telemetry Components
# ********************
Expand Down
81 changes: 77 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ services:
condition: service_started
logging: *logging


# Cart service
cart:
image: ${IMAGE_NAME}:${DEMO_VERSION}-cart
Expand All @@ -102,20 +103,43 @@ services:
- CART_PORT
- FLAGD_HOST
- FLAGD_PORT
- VALKEY_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=cart
- ASPNETCORE_URLS=http://*:${CART_PORT}
depends_on:
valkey-cart:
condition: service_started

otel-collector:
condition: service_started
flagd:
condition: service_started
logging: *logging

cart-dapr:
image: "daprio/daprd:edge"
container_name: cart-dapr
command: [
"./daprd",
"-app-id",
"product-catalog",
"-app-port",
"${PRODUCT_CATALOG_PORT}",
"-placement-host-address",
"dapr-placement:50006",
"-resources-path",
"/configuration/config.yaml",
"-config",
"/dapr/config.yaml"
]
volumes:
- "./src/dapr/components/:/components"
- "./src/dapr/:/configuration"
depends_on:
- cart
- valkey-cart
- dapr-placement
network_mode: "service:cart"

# Checkout service
checkout:
image: ${IMAGE_NAME}:${DEMO_VERSION}-checkout
Expand Down Expand Up @@ -463,6 +487,19 @@ services:
condition: service_started
logging: *logging

product_db:
image: postgres:15.3-alpine3.18
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres123
volumes:
- ./src/postgresql/product/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./src/postgresql/data:/var/lib/postgresql/data
ports:
- 5436:5432


# Product Catalog service
product-catalog:
image: ${IMAGE_NAME}:${DEMO_VERSION}-product-catalog
Expand Down Expand Up @@ -496,8 +533,36 @@ services:
condition: service_started
flagd:
condition: service_started

logging: *logging

product-dapr:
image: "daprio/daprd:edge"
container_name: product-dapr
command: [
"./daprd",
"-app-id",
"product-catalog",
"-app-port",
"${PRODUCT_CATALOG_PORT}",
"-placement-host-address",
"dapr-placement:50006",
"-resources-path",
"/configuration/config.yaml",
"-config",
"/dapr/config.yaml"
]
volumes:
- "./src/dapr/components/:/components"
- "./src/dapr/:/configuration"
depends_on:
product_db:
condition: service_started
dapr-placement:
condition: service_started
logging: *logging
network_mode: "service:product-catalog"

# Quote service
quote:
image: ${IMAGE_NAME}:${DEMO_VERSION}-quote
Expand Down Expand Up @@ -717,7 +782,15 @@ services:
- "${VALKEY_PORT}"
logging: *logging


# ********************
# Dapr Components
# ********************
dapr-placement:
image: "daprio/dapr"
container_name: dapr-placement
command: [ "./placement", "-port", "50006" ]
ports:
- "50006:50006"
# ********************
# Telemetry Components
# ********************
Expand Down
6 changes: 5 additions & 1 deletion src/accounting/Accounting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.7" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="1.12.0" />

<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="1.11.0" />
<PackageReference Include="Dapr.Client" Version="1.13.1" />
<PackageReference Include="Dapr.AspNetCore" Version="1.13.*-*" />

</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/accounting/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using Accounting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Dapr;
using Dapr.Client;

Console.WriteLine("Accounting service started");

Expand Down
15 changes: 5 additions & 10 deletions src/cart/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,16 @@
using OpenFeature.Hooks;

var builder = WebApplication.CreateBuilder(args);
string valkeyAddress = builder.Configuration["VALKEY_ADDR"];
if (string.IsNullOrEmpty(valkeyAddress))
{
Console.WriteLine("VALKEY_ADDR environment variable is required.");
Environment.Exit(1);
}


builder.Logging
.AddOpenTelemetry(options => options.AddOtlpExporter())
.AddConsole();

builder.Services.AddSingleton<ICartStore>(x =>
{
var store = new ValkeyCartStore(x.GetRequiredService<ILogger<ValkeyCartStore>>(), valkeyAddress);
var store = new DaprStateManagementCartStore(x.GetRequiredService<ILogger<DaprStateManagementCartStore>>(), "cart-state-store");

store.Initialize();
return store;
});
Expand All @@ -50,7 +46,7 @@
builder.Services.AddSingleton(x =>
new CartService(
x.GetRequiredService<ICartStore>(),
new ValkeyCartStore(x.GetRequiredService<ILogger<ValkeyCartStore>>(), "badhost:1234"),
new DaprStateManagementCartStore(x.GetRequiredService<ILogger<DaprStateManagementCartStore>>(), "bad-state-store"),
x.GetRequiredService<IFeatureClient>()
));

Expand Down Expand Up @@ -84,8 +80,7 @@

var app = builder.Build();

var ValkeyCartStore = (ValkeyCartStore)app.Services.GetRequiredService<ICartStore>();
app.Services.GetRequiredService<StackExchangeRedisInstrumentation>().AddConnection(ValkeyCartStore.GetConnection());


app.MapGrpcService<CartService>();
app.MapGrpcHealthChecksService();
Expand Down
8 changes: 8 additions & 0 deletions src/cart/src/cart.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,17 @@
<PackageReference Include="OpenTelemetry.Resources.Host" Version="1.11.0-beta.2" />
<PackageReference Include="StackExchange.Redis" Version="2.8.31" />
<PackageReference Include="OpenFeature.Contrib.Providers.Flagd" Version="0.3.2" />


<PackageReference Include="Dapr.AspNetCore" Version="1.15.2" />




<PackageReference Include="OpenFeature" Version="2.7.0" />
<PackageReference Include="OpenFeature.DependencyInjection" Version="2.7.0" />
<PackageReference Include="OpenFeature.Hosting" Version="2.7.0" />

</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading