microsoft/ApplicationInsights-Kubernetes

Refactor: Make container id optional

xiaomi7732 opened this issue · 1 comments

We have been using container id to locate pod name. It worked well except container id is not always within a container. In that case, allows a way to making the enhancement work without container id info is still preferrable.

  • Container id becomes optional for telemetries
    • On Linux, since the container id is auto detected, when it is not available, a warning is issued;
      • There are 3 ways to get a container id included in the telemetry:
        1. The user explicit sets the environment variable of ContainerId.
        2. Auto detect.
        3. Fallback: There is only 1 container inside the pod, that will be used.
    • On Windows, there will not be warnings since container id is optional. There are 2 ways for container id to be there:
      • 1 and 3 above.