opentelemetry-demo
opentelemetry-demo copied to clipboard
Cart-Service need more helpful log / status check
used wrong env OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
, cart-service can't connect to OTLP
but no error log
➜ charts git:(wph95/otel-demo) ✗ kc logs demo-cart-service-57f754d46f-hmj7m
Connecting to Redis: demo-redis:6379,ssl=false,allowAdmin=true,abortConnect=false
Successfully connected to Redis
Performing small test
Small test result: OK
Initialization completed
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://[::]:8080
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /usr/src/app
Connection failed. Disposing the object
Connection failed. Disposing the object
Connection to redis was retored successfully
Connection to redis was retored successfully
GetCartAsync called with userId=0685aee7-b2b7-47c3-893a-ae4b898138f0
AddItemAsync called with userId=0685aee7-b2b7-47c3-893a-ae4b898138f0, productId=1YMWWN1N4O, quantity=1
GetCartAsync called with userId=0685aee7-b2b7-47c3-893a-ae4b898138f0
used right env OTEL_EXPORTER_OTLP_ENDPOINT
, connect to OTLP
➜ charts git:(wph95/otel-demo) ✗ kc logs demo-cart-service-57f754d46f-hmj7m
Connecting to Redis: demo-redis:6379,ssl=false,allowAdmin=true,abortConnect=false
Successfully connected to Redis
Performing small test
Small test result: OK
Initialization completed
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://[::]:8080
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /usr/src/app
Connection failed. Disposing the object
Connection failed. Disposing the object
Connection to redis was retored successfully
Connection to redis was retored successfully
GetCartAsync called with userId=0685aee7-b2b7-47c3-893a-ae4b898138f0
AddItemAsync called with userId=0685aee7-b2b7-47c3-893a-ae4b898138f0, productId=1YMWWN1N4O, quantity=1
GetCartAsync called with userId=0685aee7-b2b7-47c3-893a-ae4b898138f0
might improve LogLevel ?
@mic-max could you potentially take a look when youre back?
Logging is done with plain Console log statements. It should be using the Logging API. I can make a small PR attempt...
I have replaced the Console log statements as opentelemetry log API.
This will be addressed in future logging work - closing for now.