humanmade / aws-xray

HM Platform AWS X-Ray Integration
23 stars 4 forks source link

Use shutdown hook #32

Closed joehoyle closed 5 years ago

joehoyle commented 5 years ago

For better compatibility with other plugins that want to do things on shutdown, we use the shutdown hook (when possible). This means that other plugins can run their shutdown things before or after xray, depending on priority.

johnbillion commented 5 years ago

I think this will still cause problems. The culprit is the call to fastcgi_finish_request that sends output to the browser and causes all subsequent output to disappear into the void.

You could jack up the hook priority to PHP_INT_MAX I guess.