Skip to content

Fix Node DEP0152 GC deprecation warning in SystemMetricsCollector - #20

Merged
mvogttech merged 1 commit into
SkySignalAPM:mainfrom
joaovictornsv:fix/gc-deprecation-dep0152
Aug 14, 2026
Merged

Fix Node DEP0152 GC deprecation warning in SystemMetricsCollector#20
mvogttech merged 1 commit into
SkySignalAPM:mainfrom
joaovictornsv:fix/gc-deprecation-dep0152

Conversation

@joaovictornsv

@joaovictornsv joaovictornsv commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix DeprecationWarning: Custom PerformanceEntry accessors are deprecated (DEP0152) in GC monitoring by reading entry.detail.kind instead of the deprecated entry.kind accessor.
  • Correct GC pause-time accounting by comparing against numeric perf_hooks constants (NODE_PERFORMANCE_GC_MAJOR, NODE_PERFORMANCE_GC_MINOR, NODE_PERFORMANCE_GC_INCREMENTAL) instead of string labels like 'major' / 'minor'.
  • Bump package version to 1.1.1.

Test plan

  • npm test — all 1141 unit tests pass
  • Manual repro with --trace-deprecation --expose-gc: DEP0152 warning no longer appears after fix
  • New unit tests for _getGcKind and _processGcEntry

Read GC kind from entry.detail.kind with a fallback for older Node, and use numeric perf_hooks constants so gcPauseTime accounting is correct on Node 24.
@mvogttech
mvogttech merged commit d9cf299 into SkySignalAPM:main Aug 14, 2026
2 checks passed
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.

2 participants