Skip to content
New issue

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

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

Already on GitHub? # to your account

Add plugin for phpredis. #29

Merged
merged 10 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ jobs:
tools: php-config, composer:v2
extensions: >
bcmath, calendar, ctype, dom, exif, gettext, iconv, intl, json, mbstring,
mysqli, mysqlnd, opcache, pdo, pdo_mysql, phar, posix, readline, memcached,
swoole-${{ matrix.version.swoole }}, xml, xmlreader, xmlwriter, yaml, zip
mysqli, mysqlnd, opcache, pdo, pdo_mysql, phar, posix, readline, redis,
memcached, swoole-${{ matrix.version.swoole }}, xml, xmlreader, xmlwriter,
yaml, zip

- name: Setup php-fpm for Linux
if: matrix.os == 'ubuntu-20.04'
Expand Down
6 changes: 4 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ libc = "0.2.132"
once_cell = "1.14.0"
phper = "0.5.1"
prost = "0.11.0"
serde_json = { version = "1.0.87", features = ["preserve_order"] }
skywalking = "0.4.0"
systemstat = "0.2.0"
tempfile = "3.3.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SkyWalking PHP Agent requires SkyWalking 8.4+ and PHP 7.2+
* [x] [PDO](https://www.php.net/manual/en/book.pdo.php)
* [x] [MySQL Improved](https://www.php.net/manual/en/book.mysqli.php)
* [x] [Memcached](https://www.php.net/manual/en/book.memcached.php)
* [ ] [phpredis](https://github.com/phpredis/phpredis)
* [x] [phpredis](https://github.com/phpredis/phpredis)
* [ ] [php-amqp](https://github.com/php-amqp/php-amqp)
* [ ] [php-rdkafka](https://github.com/arnaud-lb/php-rdkafka)
* [x] [predis](https://github.com/predis/predis)
Expand Down
1 change: 1 addition & 0 deletions docs/en/setup/service-agent/php-agent/Supported-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The following plugins provide the distributed tracing capability.
* [PDO](https://www.php.net/manual/en/book.pdo.php)
* [MySQL Improved](https://www.php.net/manual/en/book.mysqli.php)
* [Memcached](https://www.php.net/manual/en/book.memcached.php)
* [phpredis](https://github.com/phpredis/phpredis)

## Support PHP library

Expand Down
1 change: 1 addition & 0 deletions src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ pub const COMPONENT_PHP_PDO_ID: i32 = 8003;
pub const COMPONENT_PHP_MYSQLI_ID: i32 = 8004;
pub const COMPONENT_PHP_PREDIS_ID: i32 = 8006;
pub const COMPONENT_PHP_MEMCACHED_ID: i32 = 20;
pub const COMPONENT_PHP_REDIS_ID: i32 = 7;
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ mod execute;
mod module;
mod plugin;
mod request;
mod tag;
mod util;
mod worker;

Expand Down
2 changes: 2 additions & 0 deletions src/plugin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ mod plugin_memcached;
mod plugin_mysqli;
mod plugin_pdo;
mod plugin_predis;
mod plugin_redis;
mod plugin_swoole;

use crate::execute::{AfterExecuteHook, BeforeExecuteHook};
Expand All @@ -33,6 +34,7 @@ static PLUGINS: Lazy<Vec<Box<DynPlugin>>> = Lazy::new(|| {
Box::new(plugin_swoole::SwooleHttpResponsePlugin::default()),
Box::new(plugin_predis::PredisPlugin::default()),
Box::new(plugin_memcached::MemcachedPlugin::default()),
Box::new(plugin_redis::RedisPlugin::default()),
]
});

Expand Down
Loading