Refactor: Make container id optional
xiaomi7732 opened this issue · 1 comments
xiaomi7732 commented
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.
xiaomi7732 commented
- 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:
- The user explicit sets the environment variable of
ContainerId
. - Auto detect.
- Fallback: There is only 1 container inside the pod, that will be used.
- The user explicit sets the environment variable of
- There are 3 ways to get a container id included in the telemetry:
- 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.
- On Linux, since the container id is auto detected, when it is not available, a warning is issued;