Replies: 2 comments 2 replies
-
I will add SPA logging correlation as we spoke but I'm bit out of time (but wanna do that) its good idea to include :) I have that in my app but not in workshop since i use custom SDK for that.. In the PNG you post in discussion you can see the tab LOGS there are all logs for this trace available sorted by time... for each operation... So elastic stack helps a lot with correlation of logs and traces if you follow some rules. (this also apply for non elastic monitoring)
If you wanna quickstart logging from frontend you can also use ElasticAPM Agent for javascript (https://www.elastic.co/guide/en/apm/agent/rum-js/current/index.html) but there are some disadvantages as you go to platform specific observability and you lost power of opentelemetry... In distributed tracing and logging all is builded by refs. All records usually has some Some languages as .Net have some native support and helps you a lot with context propagation (passing root/traceid betwwen http calls) so some stoff are automatically copyed in your request between services. Unfortunately javascript does not have this support and you need to use some SDK to help you with.. |
Beta Was this translation helpful? Give feedback.
-
I guess the SPA need is not as important but more a nice to have in the long run. Maybe a small follow up... like you stated : All records usually has some root_id and parentId or transactionId. |
Beta Was this translation helpful? Give feedback.
-
Can you maybe show some example flow of a request that goes from frontend to backend in regards to logging?
Some context to this question, I have not installed the complete sample and I've not used Elastic before.
So I was wondering how the end result in the dashboard would be if you need to 'trace' the logs in reference to an action the user did on a SPA that touches an API and maybe does call out to other API's or backends.
I see ElasticApmTraceId as being added as a reference id? But not sure if that is carried over to other calls from API to API?
Anyhow, any feedback/sample would be nice :)
I know https://github.com/damikun/trouble-training/blob/main/Doc/Assets/CreateWebHook_Output.png shows this flow, but more details on how this came about is what I'm referring too...
Beta Was this translation helpful? Give feedback.
All reactions