[ 
https://issues.apache.org/jira/browse/AMBARI-26246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907010#comment-17907010
 ] 

zrain commented on AMBARI-26246:
--------------------------------

[~nikitapande] This is a great idea! Tracking and collecting errors can help us 
quickly pinpoint issues and effectively eliminate the time spent reproducing 
them. In my experience, I typically use Sentry or track.js to achieve this. 
These tools allow us to report issues via a unified interface while retaining 
the relevant call stack for further analysis.

 
The reference you provided is for a Node.js service, which means that if we 
implement error reporting in this way, the Ambari server would need to provide 
the necessary interfaces or services. This might require further evaluation. 
Additionally, the security concerns you mentioned should not be overlooked. 
Those {{console.log}} statements might be legacy code, and I believe this can 
be addressed with a Babel plugin. This way, we can retain {{console.log}} 
during development while ensuring they are removed in the production 
environment.

> Implement Server-Side Logging for Ambari-Web and Ambari-Admin (Remove 
> console.log)
> ----------------------------------------------------------------------------------
>
>                 Key: AMBARI-26246
>                 URL: https://issues.apache.org/jira/browse/AMBARI-26246
>             Project: Ambari
>          Issue Type: Improvement
>          Components: ambari-admin, ambari-web
>            Reporter: Nikita Pande
>            Priority: Major
>
> Currently, Ambari-Admin and Ambari-Web rely on {{console.log}} for logging, 
> which has several drawbacks:
>  * *Client-Side Logging:* {{console.log}} statements are executed on the 
> client (user's browser) and are not persisted on the server. This means 
> valuable information about errors and application behavior is lost.
>  * *Unsuitable for Production:* {{console.log}} statements should not be used 
> in production environments because:
>  ** Security Concerns: Sensitive information accidentally logged through 
> {{console.log}} could be exposed to unauthorized users.
>  ** Difficulty in Debugging: Logs are not centralized and can be challenging 
> to analyze for debugging purposes.
> *Proposed Solution:*
> This ticket proposes implementing a custom logging solution for Ambari-Admin 
> and Ambari-Web. The new logging system should:
>  * *Server-Side Logging:* Logs should be generated on the server-side and 
> persisted in a centralized location for easier access and analysis.
>  * *Log Levels:* Support different log levels (e.g., debug, info, warn, 
> error) to categorize the severity of logged messages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to