Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trace convenience function that encapsulates try-catch-finally boilerplate code #841

Merged
merged 2 commits into from
Oct 10, 2022

Conversation

Nevay
Copy link
Contributor

@Nevay Nevay commented Oct 9, 2022

Encapsulates the try-catch-finally boilerplate code, especially useful for decorators.

$span = $this->tracer
    ->spanBuilder('example')
    ->startSpan();
return trace($span, $decorated->method(...), func_get_args());

@Nevay Nevay requested a review from a team as a code owner October 9, 2022 23:22
@Nevay Nevay force-pushed the feature/trace-convenience-function branch from 9a49a9d to 78e10eb Compare October 9, 2022 23:29
@Nevay Nevay force-pushed the feature/trace-convenience-function branch from ef0003c to 8c4e666 Compare October 10, 2022 16:42
@brettmc brettmc merged commit 47f8ab9 into open-telemetry:main Oct 10, 2022
@Nevay Nevay deleted the feature/trace-convenience-function branch April 19, 2023 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants