Not able to use traces within .net core 8 app behind IIS

We are unable to receive trace samples when the app is hosted within IIS or azure app service (IIS). We receive transactions ok but they have no sample data.

We are using the Elastic.Apm.NetCoreAll nuget package.

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
//…rest of the method

As the above app.UseAllElasticApm has been deprecated we have also tried via the IServiceCollection extension of services.AddAllElasticApm.

Both of the above methods work when hosted in kestrel (outside of IIS).

We have also (after a lot of searching) tried setting
ElasticApm:TraceContinuationStrategy to "restart_external".

Can you please help? How do we troubleshoot this further?

no samples