Skip to content
Draft
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
28 changes: 1 addition & 27 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,55 +57,33 @@ jobs:
# Many composer dependencies need PHP 7.2+
- php_version: "7.2"
swoole_version: "4.6.7"
enable_zend_observer: "Off"
cargo_features: ""
- php_version: "7.3"
swoole_version: "4.7.1"
enable_zend_observer: "Off"
cargo_features: ""
- php_version: "7.4"
swoole_version: "4.8.10"
enable_zend_observer: "Off"
cargo_features: ""
- php_version: "8.0"
swoole_version: "5.0.0"
enable_zend_observer: "Off"
cargo_features: ""
- php_version: "8.0"
swoole_version: "5.0.0"
enable_zend_observer: "On"
cargo_features: ""
- php_version: "8.1"
swoole_version: "5.1.1"
enable_zend_observer: "Off"
cargo_features: ""
- php_version: "8.1"
swoole_version: "5.1.1"
enable_zend_observer: "On"
cargo_features: ""
- php_version: "8.2"
swoole_version: "5.1.1"
enable_zend_observer: "Off"
cargo_features: ""
- php_version: "8.2"
swoole_version: "5.1.1"
enable_zend_observer: "On"
cargo_features: ""
- php_version: "8.2"
swoole_version: "5.1.1"
enable_zend_observer: "On"
cargo_features: "--features kafka-reporter"
- php_version: "8.3"
swoole_version: "5.1.1"
enable_zend_observer: "Off"
cargo_features: ""
- php_version: "8.4"
swoole_version: "5.1.1"
enable_zend_observer: "Off"
cargo_features: ""
- php_version: "8.5"
swoole_version: "6.1.4"
enable_zend_observer: "Off"
swoole_version: "5.1.1"
cargo_features: ""

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -201,8 +179,6 @@ jobs:
id: cargo-test-step
run: |
cargo test --release --workspace ${{ matrix.flag.cargo_features }}
env:
ENABLE_ZEND_OBSERVER: ${{ matrix.flag.enable_zend_observer }}
continue-on-error: true

# Rebuild the mixture when cargo test failed.
Expand All @@ -222,8 +198,6 @@ jobs:
if: steps.cargo-test-step.outcome != 'success'
run: |
cargo test --release --workspace
env:
ENABLE_ZEND_OBSERVER: ${{ matrix.flag.enable_zend_observer }}

- name: View logs
if: always()
Expand Down
2 changes: 1 addition & 1 deletion docs/en/configuration/ini-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This is the configuration list supported in `php.ini`.
| skywalking_agent.ssl_cert_chain_path | The certificate file. Enable mTLS when `ssl_key_path` and `ssl_cert_chain_path` exist. Only available when `reporter_type` is `grpc`. | |
| skywalking_agent.heartbeat_period | Agent heartbeat report period. Unit, second. | 30 |
| skywalking_agent.properties_report_period_factor | The agent sends the instance properties to the backend every heartbeat_period * properties_report_period_factor seconds. | 10 |
| skywalking_agent.enable_zend_observer | Whether to use `zend observer` instead of `zend_execute_ex` to hook the functions, this feature is only available for PHP8+. | Off |
| skywalking_agent.enable_zend_observer | Whether to use `zend observer` instead of `zend_execute_ex` to hook the functions, this feature is only available for PHP8+. | On |
| skywalking_agent.reporter_type | Reporter type, optional values are `grpc`, `kafka` and `standalone`. | grpc |
| skywalking_agent.kafka_bootstrap_servers | A list of host/port pairs to use for connect to the Kafka cluster. Only available when `reporter_type` is `kafka`. | |
| skywalking_agent.kafka_producer_config | Configure Kafka Producer configuration in JSON format `{"key": "value}`. Only available when `reporter_type` is `kafka`. | {} |
Expand Down
3 changes: 2 additions & 1 deletion docs/en/configuration/zend-observer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Refer to: <https://www.datadoghq.com/blog/engineering/php-8-observability-baked-right-in/#the-observability-landscape-before-php-8>

By default, skywalking-php hooks the `zend_execute_internal` and `zend_execute_ex` functions to implement auto instrumentation.
On PHP 7, skywalking-php hooks the `zend_execute_internal` and `zend_execute_ex` functions to implement auto instrumentation.

But there are some drawbacks:

Expand All @@ -28,5 +28,6 @@ opcache.jit = tracing
[skywalking_agent]
extension = skywalking_agent.so
; Switch to use zend observer api to implement auto instrumentation.
; Default is On for PHP 8+.
skywalking_agent.enable_zend_observer = On
```
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ pub fn get_module() -> Module {
10i64,
Policy::System,
);
module.add_ini(SKYWALKING_AGENT_ENABLE_ZEND_OBSERVER, false, Policy::System);
module.add_ini(SKYWALKING_AGENT_ENABLE_ZEND_OBSERVER, true, Policy::System);
module.add_ini(
SKYWALKING_AGENT_REPORTER_TYPE,
"grpc".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub const EXT: &str = if cfg!(target_os = "linux") {
};

pub static ENABLE_ZEND_OBSERVER: Lazy<String> =
Lazy::new(|| env::var("ENABLE_ZEND_OBSERVER").unwrap_or_else(|_| "Off".to_owned()));
Lazy::new(|| env::var("ENABLE_ZEND_OBSERVER").unwrap_or_else(|_| "On".to_owned()));

pub static HTTP_CLIENT: Lazy<reqwest::Client> = Lazy::new(reqwest::Client::new);

Expand Down
Loading