patrickkerrigan / php-xray

A PHP instrumentation library for AWS X-Ray
BSD 3-Clause "New" or "Revised" License
63 stars 26 forks source link

fix: use `traced` only for http subsegments #6

Closed WaylandAce closed 3 years ago

WaylandAce commented 3 years ago

Now traced parameter is incorrectly used. Move it to the right place.

aws documentation: https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html#api-segmentdocuments-http

patrickkerrigan commented 3 years ago

Hi, thanks for the patch!

Rather than removing the setTraced method from RemoteSegment, please can you mark it as @deprecated instead? The property and serialisation code can stay removed as they have no effect, but this would avoid breaking existing consumers' code if they're calling it, and mean I can release this change as a patch rather than a new major version. I'll remove the method itself in 2.0.0.

This one's on me for not including it in .gitignore, but please could you also remove your composer.lock from this PR?

Once those are done, this looks good to be merged :+1: