Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

FR: Trace an Inherited Method #201

Open
iamacarpet opened this issue Sep 3, 2018 · 0 comments
Open

FR: Trace an Inherited Method #201

iamacarpet opened this issue Sep 3, 2018 · 0 comments

Comments

@iamacarpet
Copy link

Hello,

It seems that currently with opencensus_trace_method as part of the PECL extension, if the method is inherited from a parent class, the trace won't fire.

For e.g. we wanted to trace Illuminate\Http\Response::send, but it is actually inherited from Symfony\Component\HttpFoundation\Response::send.

https://github.com/a1comms/GaeSupportLaravel/blob/php72-laravel55/src/A1comms/GaeSupportLaravel/Trace/Integration/LaravelExtended.php#L32

Here, only the callback for:

opencensus_trace_method(BaseResponse::class, 'send', [self::class, 'handleResponseSend']);

and not

opencensus_trace_method(LaravelResponse::class, 'send', [self::class, 'handleResponseSend']);

is ever fired.

Would it be possible to trigger when a trace is requested on the child class?

This would properly allow re-defining the function in the child class without having to re-do the trace definition.

Regards,
iamacarpet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant