GC Heap Bytes in Use metric is based on System.GC.GetTotalMemory(false) and GC Heap Total Bytes metric is based on
System.Diagnostics.Process.GetCurrentProcess().PrivateMemorySize64.
Below are the links to their Microsoft API docs respectively:
GC.GetTotalMemory(Boolean) Method
Process.PrivateMemorySize64 Property
As for monitoring memory usage by the pod and thread usage by the process, you may consider looking at the container performance metrics as part of the UMA docker monitoring and other process monitoring metrics instead of the GC Heap metrics and the thread pool metrics being used currently.