The tracer looks in the python interpreter frame state’s local variables (f_local) for names (see here 6. So if, for a given traced value, it finds a corresponding local, it will add that as the name in the graph.