Skip to content

[APM] Add PHP runtime metrics and SDK health dashboard#277480

Merged
intuibase merged 8 commits into
elastic:mainfrom
intuibase:php_otel_health_metrics
Jul 17, 2026
Merged

[APM] Add PHP runtime metrics and SDK health dashboard#277480
intuibase merged 8 commits into
elastic:mainfrom
intuibase:php_otel_health_metrics

Conversation

@intuibase

@intuibase intuibase commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a shared OTel-native PHP runtime metrics and SDK health dashboard for:

EDOT PHP (opentelemetry/php/elastic)
OpenTelemetry PHP distro (opentelemetry/php/opentelemetry-php-distro)
Vanilla OpenTelemetry PHP instrumentation (opentelemetry/php/opentelemetry-php-instrumentation)
These variants share one dashboard because they expose the same runtime metrics from open-telemetry/opentelemetry-metrics-runtime.

The dashboard covers:

  • CPU time and context switches (process.cpu.time, process.context_switches)
  • Memory usage and limit (php.memory.*)
  • OPcache memory and statistics (php.opcache.*)
  • Garbage collection activity and timings (php.gc.*)
  • SDK span and log processor queue health (otel.sdk.processor.*)
Selection_433 Selection_432

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

No risk

@intuibase
intuibase requested review from a team as code owners July 10, 2026 13:34
@botelastic botelastic Bot added the Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation label Jul 10, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/obs-presentation-team (Team:obs-presentation)

Add OTel-native EDOT PHP dashboard covering:
- CPU time and context switches (process.cpu.time, process.context_switches)
- Memory usage and limit (php.memory.usage, php.memory.peak_usage, php.memory.limit)
- OPcache memory and statistics (php.opcache.*)
- Garbage collection activity and timings (php.gc.*)
- SDK span/log processor queue health (otel.sdk.processor.*)
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

🔍 Preview links for changed docs

⏳ Building and deploying preview... View progress

This comment will be updated with preview links when the build is complete.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Elastic Docs Style Checker (Vale)

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

@intuibase intuibase added the backport:skip This PR does not require backporting label Jul 10, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the dashboard catalog routing, the filename test cases, and the new PHP dashboard JSON. The routing and tests look consistent with getSdkNameAndLanguage/getIngestionPath. One concrete correctness concern on the dashboard JSON, left inline: per-panel state.query and layer query reference divergent metric fields.

Generated by Claude Reviewer for #277480 · 259.9 AIC · ⌖ 7.79 AIC · ⊞ 4.3K

@cauemarcondes cauemarcondes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@intuibase intuibase linked an issue Jul 13, 2026 that may be closed by this pull request
6 tasks

@jennypavlova jennypavlova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just qq ⬇️

@intuibase
intuibase enabled auto-merge (squash) July 14, 2026 11:50

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the new PHP EDOT dashboard and its catalog/test wiring. The plumbing looks correct — catalog entries, loadDashboardFile case, getDashboardFileName resolution, and the added test cases are all consistent, and the dashboard JSON is structurally valid (grid layout, panel indices, Lens column references, and {{indexPattern}} templating all check out). Left one inline comment on the dashboard about aggregating monotonic counters with AVG plus a minor stale-query note.

Generated by Claude Reviewer for #277480 · 253.4 AIC · ⌖ 11.5 AIC · ⊞ 4.3K

@intuibase
intuibase requested review from SergeyKleyman and hegerchr and removed request for SergeyKleyman and hegerchr July 14, 2026 12:18
* Synchronize Lens ES|QL query copies and use reset-aware rates for monotonic PHP runtime counters.
@intuibase
intuibase requested a review from Copilot July 15, 2026 14:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new APM static dashboard JSON for PHP runtime/SDK health metrics and wires it into the APM static dashboard catalog and dashboard selection logic.

Changes:

  • Adds a new OTel-native EDOT PHP runtime/SDK health dashboard saved object JSON.
  • Registers new PHP dashboard file names in the static dashboard catalog and loader.
  • Extends get_dashboard_file_name tests with PHP agent mappings (EDOT + vanilla OTel variants) and adds a changelog entry.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/dashboards/otel_native-edot-php.json Adds the saved-object JSON definition for the PHP runtime/SDK health dashboard
x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/dashboards/get_dashboard_file_name.test.ts Adds PHP agent → dashboard filename mappings to the test matrix
x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/dashboards/dashboard_catalog.ts Registers PHP dashboard filenames and adds a dynamic import path for them
docs/changelog/277480.yaml Adds a changelog entry for the new dashboard

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@intuibase
intuibase requested a review from Copilot July 15, 2026 14:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

@intuibase
intuibase requested a review from Copilot July 15, 2026 14:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread docs/changelog/277480.yaml Outdated
@intuibase
intuibase requested a review from a team as a code owner July 16, 2026 11:25
@kibanamachine

Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #124 / Dataset Quality Dataset Quality Details overview integrations should navigate to the selected dashboard on clicking integration dashboard action

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 2964 2965 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 3.3MB 3.4MB +61.5KB
Unknown metric groups

async chunk count

id before after diff
apm 80 81 +1

History

cc @intuibase

@intuibase
intuibase merged commit 65929bc into elastic:main Jul 17, 2026
39 checks passed
@intuibase
intuibase deleted the php_otel_health_metrics branch July 20, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:enhancement Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation v9.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement SDK health metrics in OpenTelemetry PHP SDK

6 participants