I used the code given by Anthony P. and tested every piece of the code, for completion and acompletion LLM span was properly emitting the cost using test script in my ec2 phoenix . Then i understood issue is not with phoenix , it must be our LLM app specific issue, the endpoint given in the App's environment variable file was restricting to emit cost. So i repointed to my ec2 endpoint, without any restriction it is showing the cost LLM App execution. Now i need to figure out why old endpoint was not emitting and is there any version mismatch difference between both.