ApplicationInsights-Kubernetes icon indicating copy to clipboard operation
ApplicationInsights-Kubernetes copied to clipboard

Planning on 3.0 Package

Open xiaomi7732 opened this issue 2 years ago • 0 comments

Application Insights Kubernetes has been developed for quite a while backing into days of .NET Core 1.x. As time goes by, tech develops, so do we as developers.

I file this issue looking into chances for a big refactor into 3.0 by integrating more mature technologies, more reliable implementations and at the same time, keeps it agile like it has been.

Please share your ideas so that we move forward together. Discussions by reply on this issue is more than welcome👍.

Here are some directional ideas:

  • Focus on the core

    We get K8s related properties and supply it to the logs for diagnosing for Application Insights.

    • Leverage more on existing mature technologies. For example:
      • .NET Generic Host for hosting startup scenario;
      • Use KubernetesClient to query K8s info rather than building/maintaining our own;
    • Trim down non-related functionality
      • Remove the support of CPU/Memory metrics.
      • Anything else should we remove?
  • Better architecture

    • Worker service / Background service for bootstrapping
    • Better testability with dependency injection.
    • Break down property providers
      • It would be easier to append or retire properties fetched;
      • It would be more flexible to work with scenarios where partial properties got fetched;

Is there something you have been wanted? Let us know 👇

Candidate tasks:

  • [x] #276
  • [ ] Leverage BackgroundService to bootstrap K8sEnv factory.
    • [ ] Use cancellation token for timeout
  • [x] #278
  • [ ] #288
  • [x] #286
  • [ ] Refactor K8sEnv factory to a builder
  • [ ] Look into get PodName from the access token for service account within the pod
  • [ ] Allowing custom service account other than default
  • [ ] Look into drop the dependency on Newtonsoft.Json
  • [ ] Revisit service lifetime with DI

xiaomi7732 avatar May 27 '22 23:05 xiaomi7732