Njeriiii / CodeQualityAnalyzer

enhance Java code quality through an interactive tool window
1 stars 0 forks source link

Implement a background task functionality for periodically send telemetry data. #9

Closed samvaity closed 2 months ago

samvaity commented 4 months ago

This involves

>>>>

To implement background telemetry functionality, follow these steps:

Due: 06-06-2024

Update:

Due: 06-14-2024

Njeriiii commented 3 months ago

Initially worked on this with the Connection Strings rule:

  1. Configure API Endpoints: The TelemetryClient object created in TelemetryClientProvider is configured with an instrumentation key from a JSON file, which is used to identify the application to App Insights.
  2. Handle Data Transmission: Sending telemetry data in the ConnectionStringCheck class. When a 'problem' is found in the code, an event is sent to Application Insights with the trackEvent method. Then immediately send the data with the flush method. This isn’t a background service, but it does send data. I tried to work on a background service that calls the trackMemoryUsage method every 60 seconds to track the memory usage of the application.
  3. Azure Application Insights SDK uses HTTPS to securely send data. I don’t need to handle this myself.

https://github.com/Njeriiii/azure-tools-for-java/pull/6