Azure / azure-linux-extensions

Linux Virtual Machine Extensions for Azure
Apache License 2.0
309 stars 255 forks source link

Refactoring GuestAgent based Logging Mechanism #1978

Open arisettisanjana opened 2 months ago

arisettisanjana commented 2 months ago

Currently, to capture logs for each extension run, we use the event logging feature provided by the Guest Agent, which pushes extension telemetry to the AzCore Kusto cluster's fa database. This process involves initially writing logs to a temporary directory under the events folder. However, this occasionally leads to a non-blocking error, "failed to clear the temp directory," which occurs when the Guest Agent checks the events folder before the temporary directory has been cleaned up. Solution: To address this now we are directly writing files to the events folder.