@eenchev ,
Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
As of now, there are no out-of-box solution available to implement this.
- You can check Rewrite HTTP headers with Application Gateway, to add, remove, or update HTTP request and response headers
- However, currently, I don't see support for "x-appgw-trace-id" in the list of Server variables.
If you wish you may vote in Azure Feedback Hub forum requesting this feature in Server variable.
All the feedback shared in these forums are monitored and reviewed by the Microsoft engineering teams responsible for building Azure.
Additionally, you can also raise a feature request to include this in Application Gateway custom error pages
Thanks,
Kapil
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.