Skip to content
Open
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
eb02d55
added skeleton version of the product review service
dmitchsplunk Oct 6, 2025
db5c438
added mysql database for the product review service
dmitchsplunk Oct 7, 2025
bfcfbb4
added LLM with tool call to fetch product reviews
dmitchsplunk Oct 9, 2025
3e7cec1
added product reviews and summaries for each product
dmitchsplunk Oct 9, 2025
29f8b17
updated LLM service to return pre-generated product summary
dmitchsplunk Oct 12, 2025
884cfc6
added llm, mysql, and product-reviews to build pipeline
dmitchsplunk Oct 14, 2025
c1c64b1
changed how the product review service returns summaries
dmitchsplunk Oct 14, 2025
24ff659
added feature flags for LLM service
dmitchsplunk Oct 14, 2025
8a0d26f
added metrics to product review service
dmitchsplunk Oct 14, 2025
9562403
added tests for the product review service
dmitchsplunk Oct 14, 2025
085b5df
added new services to docker-compose.minimal.yml
dmitchsplunk Oct 14, 2025
b8d7c2e
added product review, llm, and mysql services to k8s manifest
dmitchsplunk Oct 15, 2025
e88a710
fixed mysql port in k8s manifest
dmitchsplunk Oct 15, 2025
8744666
Merge remote-tracking branch 'upstream/main' into add-product-review-…
dmitchsplunk Oct 15, 2025
b6bfdd6
updated versions of new services
dmitchsplunk Oct 15, 2025
e19005f
updated README for the LLM service
dmitchsplunk Oct 15, 2025
c5b55b5
added product reviews to UI
dmitchsplunk Oct 17, 2025
d5027ba
updated product review UI
dmitchsplunk Oct 17, 2025
0750066
added product review summary to product page
dmitchsplunk Oct 17, 2025
a5fb328
cleaned up visualization of product reviews
dmitchsplunk Oct 17, 2025
552213f
fixed product review score percentage calculation
dmitchsplunk Oct 17, 2025
e38eee3
Merge remote-tracking branch 'upstream/main' into add-product-review-…
dmitchsplunk Oct 17, 2025
f448c6e
added Cypress tests for product reviews
dmitchsplunk Oct 17, 2025
2ee12c7
updated changelog, removed temporary images, and updated loadgen
dmitchsplunk Oct 17, 2025
c4a8798
resolved merge conflict in CHANGELOG.md
dmitchsplunk Oct 22, 2025
3c5da61
restore kubernetes manifest to current state
dmitchsplunk Oct 22, 2025
9fbde1d
reverting changes to kubernetes/opentelemetry-demo.yaml
dmitchsplunk Oct 22, 2025
ae0b287
updated product review service to use postgres instead of mysql
dmitchsplunk Oct 22, 2025
1a30281
updated product review service to use structured outputs
dmitchsplunk Oct 22, 2025
b7c6c0c
Merge branch 'main' into add-product-review-service
julianocosta89 Oct 23, 2025
1f112a1
build(deps): bump jvm (#2679)
dependabot[bot] Oct 23, 2025
971200a
Merge remote-tracking branch 'upstream/main' into add-product-review-…
dmitchsplunk Oct 23, 2025
31530db
resolved markdown lint errors and disabled the llmInaccurateResponse …
dmitchsplunk Oct 23, 2025
696a856
resolved protobufcheck and sanitycheck issues
dmitchsplunk Oct 23, 2025
ff9357b
resolving licensecheck issues
dmitchsplunk Oct 23, 2025
f08f080
Merge remote-tracking branch 'upstream/main' into add-product-review-…
dmitchsplunk Oct 23, 2025
298055a
updated product reviews to include interactive AI component
dmitchsplunk Oct 24, 2025
cacdb72
updated product review service to add AI assistant capabilities
dmitchsplunk Oct 24, 2025
57d4239
updated frontend to use new Product AI Assistant
dmitchsplunk Oct 24, 2025
4fc7dac
added tool call to AI assistant to fetch product info
dmitchsplunk Oct 25, 2025
37009bb
Processes all tool calls in a loop
julianocosta89 Oct 29, 2025
eb7cc86
Merge branch 'main' into add-product-review-service
julianocosta89 Oct 29, 2025
24e7419
Add license
julianocosta89 Oct 29, 2025
4f5a088
updated mock LLM logic to match product review service updates
dmitchsplunk Oct 30, 2025
46dade1
Add line break
julianocosta89 Oct 30, 2025
5953898
build(deps): bump github/codeql-action (#2698)
dependabot[bot] Oct 30, 2025
1df96c3
Merge remote-tracking branch 'upstream/main' into add-product-review-…
dmitchsplunk Oct 30, 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
16 changes: 16 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ PRODUCT_CATALOG_PORT=3550
PRODUCT_CATALOG_ADDR=product-catalog:${PRODUCT_CATALOG_PORT}
PRODUCT_CATALOG_DOCKERFILE=./src/product-catalog/Dockerfile

# Product Reviews Service
PRODUCT_REVIEWS_PORT=3551
PRODUCT_REVIEWS_ADDR=product-reviews:${PRODUCT_REVIEWS_PORT}
PRODUCT_REVIEWS_DOCKERFILE=./src/product-reviews/Dockerfile

# Quote Service
QUOTE_PORT=8090
QUOTE_ADDR=http://quote:${QUOTE_PORT}
Expand Down Expand Up @@ -150,6 +155,17 @@ KAFKA_HOST=kafka
KAFKA_ADDR=${KAFKA_HOST}:${KAFKA_PORT}
KAFKA_DOCKERFILE=./src/kafka/Dockerfile

# LLM service
LLM_DOCKERFILE=./src/llm/Dockerfile
LLM_HOST=llm
LLM_PORT=8000

# Mock LLM - to use a real OpenAI API-compatible LLM,
# configure the .env.override file
LLM_BASE_URL=http://${LLM_HOST}:${LLM_PORT}/v1
LLM_MODEL=astronomy-llm
OPENAI_API_KEY=dummy

# Valkey
VALKEY_PORT=6379
VALKEY_ADDR=valkey-cart:${VALKEY_PORT}
Expand Down
10 changes: 10 additions & 0 deletions .env.override
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# DO NOT PUSH CHANGES OF THIS FILE TO opentelemetry/opentelemetry-demo
# PLACE YOUR .env ENVIRONMENT VARIABLES OVERRIDES IN THIS FILE


# To use a real OpenAI API-compatible LLM,
# set the appropriate values for the target LLM
# Required permissions:
# [Models and Model capabilities]

#LLM_BASE_URL=https://api.openai.com/v1
#LLM_MODEL=gpt-4o-mini
#OPENAI_API_KEY=<replace with API key>
8 changes: 8 additions & 0 deletions .github/workflows/component-build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ jobs:
tag_suffix: kafka
context: ./
setup-qemu: true
- file: ./src/llm/Dockerfile
tag_suffix: llm
context: ./
setup-qemu: true
- file: ./src/load-generator/Dockerfile
tag_suffix: load-generator
context: ./
Expand All @@ -126,6 +130,10 @@ jobs:
tag_suffix: product-catalog
context: ./
setup-qemu: true
- file: ./src/product-reviews/Dockerfile
tag_suffix: product-reviews
context: ./
setup-qemu: true
- file: ./src/quote/Dockerfile
tag_suffix: quote
context: ./
Expand Down
2 changes: 2 additions & 0 deletions .licenserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
"src/checkout/genproto/",
"src/flagd-ui/assets/vendor/",
"src/product-catalog/genproto/",
"src/product-reviews/demo_pb2.py",
"src/product-reviews/demo_pb2_grpc.py",
"src/react-native-app/ios/Pods/",
"src/react-native-app/ios/build/",
"src/react-native-app/android/app/build/",
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ the release.
([#2615](https://github.com/open-telemetry/opentelemetry-demo/pull/2615))
* [frontend] Fix navigation and cart math
([#2660](https://github.com/open-telemetry/opentelemetry-demo/pull/2660))
* [feat] Add Product Review service with AI-generated summaries
([#2663](https://github.com/open-telemetry/opentelemetry-demo/pull/2663))
* [chore] Upgrade OpenFeature and add fix deprecation warnings for dependency
injection
([#2644](https://github.com/open-telemetry/opentelemetry-demo/pull/2644))
Expand Down
5 changes: 5 additions & 0 deletions docker-compose-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ services:
- FRONTEND_ADDR
- PAYMENT_ADDR
- PRODUCT_CATALOG_ADDR
- PRODUCT_REVIEWS_ADDR
- RECOMMENDATION_ADDR
- SHIPPING_ADDR
- KAFKA_ADDR
Expand Down Expand Up @@ -73,10 +74,14 @@ services:
condition: service_started
frontend:
condition: service_started
llm:
condition: service_started
payment:
condition: service_started
product-catalog:
condition: service_started
product-reviews:
condition: service_started
quote:
condition: service_started
recommendation:
Expand Down
62 changes: 62 additions & 0 deletions docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,47 @@ services:
condition: service_started
logging: *logging

# Product reviews service
product-reviews:
image: ${IMAGE_NAME}:${DEMO_VERSION}-product-reviews
container_name: product-reviews
build:
context: ./
dockerfile: ${PRODUCT_REVIEWS_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-product-reviews
deploy:
resources:
limits:
memory: 500M
restart: unless-stopped
ports:
- "${PRODUCT_REVIEWS_PORT}"
environment:
- PRODUCT_REVIEWS_PORT
- OTEL_PYTHON_LOG_CORRELATION=true
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=product-reviews
- OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
- DB_CONNECTION_STRING=host=${POSTGRES_HOST} user=otelu password=otelp dbname=${POSTGRES_DB}
- LLM_BASE_URL
- OPENAI_API_KEY
- LLM_MODEL
- PRODUCT_CATALOG_ADDR
depends_on:
product-catalog:
condition: service_started
llm:
condition: service_started
postgresql:
condition: service_started
otel-collector:
condition: service_started
logging: *logging

# Quote service
quote:
image: ${IMAGE_NAME}:${DEMO_VERSION}-quote
Expand Down Expand Up @@ -559,6 +600,27 @@ services:
logging:
*logging

# LLM used by Product Review service
llm:
image: ${IMAGE_NAME}:${DEMO_VERSION}-llm
container_name: llm
build:
context: ./
dockerfile: ${LLM_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-llm
deploy:
resources:
limits:
memory: 50M
restart: unless-stopped
environment:
- FLAGD_HOST
- FLAGD_PORT
ports:
- "${LLM_PORT}"
logging: *logging

# Valkey used by Cart service
valkey-cart:
image: ${VALKEY_IMAGE}
Expand Down
66 changes: 66 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ services:
- CHECKOUT_ADDR
- CURRENCY_ADDR
- PRODUCT_CATALOG_ADDR
- PRODUCT_REVIEWS_ADDR
- RECOMMENDATION_ADDR
- SHIPPING_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
Expand Down Expand Up @@ -511,6 +512,47 @@ services:
condition: service_started
logging: *logging

# Product reviews service
product-reviews:
image: ${IMAGE_NAME}:${DEMO_VERSION}-product-reviews
container_name: product-reviews
build:
context: ./
dockerfile: ${PRODUCT_REVIEWS_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-product-reviews
deploy:
resources:
limits:
memory: 100M
restart: unless-stopped
ports:
- "${PRODUCT_REVIEWS_PORT}"
environment:
- PRODUCT_REVIEWS_PORT
- OTEL_PYTHON_LOG_CORRELATION=true
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=product-reviews
- OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
- DB_CONNECTION_STRING=host=${POSTGRES_HOST} user=otelu password=otelp dbname=${POSTGRES_DB}
- LLM_BASE_URL
- OPENAI_API_KEY
- LLM_MODEL
- PRODUCT_CATALOG_ADDR
depends_on:
product-catalog:
condition: service_started
llm:
condition: service_started
postgresql:
condition: service_started
otel-collector:
condition: service_started
logging: *logging

# Quote service
quote:
image: ${IMAGE_NAME}:${DEMO_VERSION}-quote
Expand Down Expand Up @@ -704,6 +746,30 @@ services:
retries: 10
logging: *logging

# LLM used by Product Review service
llm:
image: ${IMAGE_NAME}:${DEMO_VERSION}-llm
container_name: llm
build:
context: ./
dockerfile: ${LLM_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-llm
deploy:
resources:
limits:
memory: 50M
restart: unless-stopped
environment:
- FLAGD_HOST
- FLAGD_PORT
ports:
- "${LLM_PORT}"
depends_on:
flagd:
condition: service_started
logging: *logging

# Postgresql used by Accounting service
postgresql:
image: ${IMAGE_NAME}:${DEMO_VERSION}-postgresql
Expand Down
1 change: 1 addition & 0 deletions docker-gen-proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ if [ -z "$1" ]; then
#gen_proto_js payment
gen_proto_go product-catalog
#gen_proto_php quote
gen_proto_python product-reviews
gen_proto_python recommendation
#gen_proto_rust shipping
else
Expand Down
1 change: 1 addition & 0 deletions ide-gen-proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ gen_proto_ts frontend
gen_proto_ts react-native-app
gen_proto_js payment
gen_proto_go product-catalog
gen_proto_go product-reviews
# gen_proto_php quote
gen_proto_python recommendation
gen_proto_rust shipping
39 changes: 39 additions & 0 deletions pb/demo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,45 @@ message SearchProductsResponse {
repeated Product results = 1;
}

// ---------------Product Review service----------

service ProductReviewService {
rpc GetProductReviews(GetProductReviewsRequest) returns (GetProductReviewsResponse){}
rpc GetAverageProductReviewScore(GetAverageProductReviewScoreRequest) returns (GetAverageProductReviewScoreResponse){}
rpc AskProductAIAssistant(AskProductAIAssistantRequest) returns (AskProductAIAssistantResponse){}
}

message ProductReview {
string username = 1;
string description = 2;
string score = 3;
}

message GetProductReviewsRequest {
string product_id = 1;
}

message GetProductReviewsResponse {
repeated ProductReview product_reviews = 1;
}

message GetAverageProductReviewScoreRequest {
string product_id = 1;
}

message GetAverageProductReviewScoreResponse {
string average_score = 1;
}

message AskProductAIAssistantRequest {
string product_id = 1;
string question = 2;
}

message AskProductAIAssistantResponse {
string response = 1;
}

// ---------------Shipping Service----------

service ShippingService {
Expand Down
6 changes: 3 additions & 3 deletions src/accounting/Entities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Accounting;

[Table("shipping")]
[Table("shipping", Schema = "accounting")]
[PrimaryKey(nameof(ShippingTrackingId))]
internal class ShippingEntity
{
Expand All @@ -32,7 +32,7 @@ internal class ShippingEntity
public required string OrderId { get; set; }
}

[Table("orderitem")]
[Table("orderitem", Schema = "accounting")]
[PrimaryKey(nameof(ProductId), nameof(OrderId))]
internal class OrderItemEntity
{
Expand All @@ -49,7 +49,7 @@ internal class OrderItemEntity
public required string OrderId { get; set; }
}

[Table("order")]
[Table("order", Schema = "accounting")]
[PrimaryKey(nameof(Id))]
internal class OrderEntity
{
Expand Down
Loading
Loading