You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2024/11/30 14:18:03 UTC
(skywalking-php) branch master updated: Support `Swoole\Http\Server` (#121)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-php.git
The following commit(s) were added to refs/heads/master by this push:
new d3c32ae Support `Swoole\Http\Server` (#121)
d3c32ae is described below
commit d3c32aef71fe1ad485c310bd1583ad4e57602a0e
Author: jmjoy <jm...@apache.org>
AuthorDate: Sat Nov 30 22:17:59 2024 +0800
Support `Swoole\Http\Server` (#121)
---
src/plugin/plugin_swoole.rs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/plugin/plugin_swoole.rs b/src/plugin/plugin_swoole.rs
index 46112f1..93ce2f4 100644
--- a/src/plugin/plugin_swoole.rs
+++ b/src/plugin/plugin_swoole.rs
@@ -30,7 +30,11 @@ pub struct SwooleServerPlugin;
impl Plugin for SwooleServerPlugin {
#[inline]
fn class_names(&self) -> Option<&'static [&'static str]> {
- Some(&[r"Swoole\Server", r"Swoole\Coroutine\Http\Server"])
+ Some(&[
+ r"Swoole\Server",
+ r"Swoole\Http\Server",
+ r"Swoole\Coroutine\Http\Server",
+ ])
}
#[inline]
@@ -42,7 +46,7 @@ impl Plugin for SwooleServerPlugin {
&self, class_name: Option<&str>, function_name: &str,
) -> Option<(Box<BeforeExecuteHook>, Box<AfterExecuteHook>)> {
match (class_name, function_name) {
- (Some(r"Swoole\Server"), "on") => Some(self.hook_on()),
+ (Some(r"Swoole\Server" | r"Swoole\Http\Server"), "on") => Some(self.hook_on()),
(Some(r"Swoole\Coroutine\Http\Server"), "handle") => Some(self.hook_handle()),
_ => None,
}