# Observability Demo
## logging attributes
[Checkout request log](https://app.datadoghq.eu/logs?query=trace_id%3A4007369013329854855%20&cols=service%2Chost&event=AgAAAYjUwGqAyaoIfgAAAAAAAAAYAAAAAEFZalV3SWFPQUFBUFNGbUhIN04zcWdDSgAAACQAAAAAMDE4OGQ1MDItMjI3Ny00MzEzLTg1MjUtODdiMDA5OTUxZTc3&index=&messageDisplay=inline&stream_sort=host%2Cdesc&viz=stream&from_ts=1687195540991&to_ts=1687197560148&live=false)
## Our Domain Object naming convention
* pandora.customer.code
* pandora.vendor.code
* pandora.order.code
* pandora.tabsquare.intent_id
Q: How the above changes improve our investigation process.
A:
1. Simple Log query: `@pandora.{domain_objec}.code` to retrive all releated logs in dine-in system
2. Add Columns for
## Case study - Checkout latency Alert
[Alert](https://deliveryhero.slack.com/archives/C043MGD70BU/p1687196730922879)
[Checkout request log](https://app.datadoghq.eu/logs?query=trace_id%3A4007369013329854855%20&cols=service%2Chost&event=AgAAAYjUwGqAyaoIfgAAAAAAAAAYAAAAAEFZalV3SWFPQUFBUFNGbUhIN04zcWdDSgAAACQAAAAAMDE4OGQ1MDItMjI3Ny00MzEzLTg1MjUtODdiMDA5OTUxZTc3&index=&messageDisplay=inline&stream_sort=host%2Cdesc&viz=stream&from_ts=1687195540991&to_ts=1687197560148&live=false)
Q: We return HTTP status code 500 to the client, do we actually refused the payment?
A: Explore order history by log query `@pandora.order.code:{order_code}`
Q: Do customer pay the order successfully in the next trial?
A: Explore customer history by log query `@pandora.customer.code:{customer_code}`
## Checkout Exception Type
1. Only pop up message on the client side, what's begind the scene: search checkout request with customer code. demo customer code: `phjut7xg`
2. Show checkout error message for a single request
3. [Log query](https://app.datadoghq.eu/logs?query=service%3Adine-in-api%20%40error.exception_type%3A%2A%20&agg_q=%40error.exception_type&cols=service%2Chost%2C%40error.exception_type&index=&messageDisplay=inline&sort_m=&sort_t=&stream_sort=host%2Cdesc&top_n=10&top_o=top&viz=toplist&x_missing=true&from_ts=1686641398715&to_ts=1687246198715&live=true)