Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

BigInt serialization TypeError in MonitorServiceImpl

オープン 初心者向け
#701 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 8 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #703 @karenc-bq による — マージ済み

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
observability

調査の方向性

common/lib/utils/monitoring/monitor_service.ts から始め、特に MonitorServiceImpl.checkMonitors() と、runCleanupLoop() を通る cleanup パスを調査します。Monitor のロギングに使用されている JSON.stringify() の呼び出しを、参照されている行および類似のケースも含めて確認します。monitoring のアクティビティによって BigInt のシリアライズに関する TypeErrors が発生しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug pending release
Describe the bug

After upgrading to 3.0.0, I've started to see uncaught exceptions from within the library for TypeError: Do not know how to serialize a BigInt. It appears that MonitorServiceImpl::checkMonitors() attempts to serialize Monitor objects for logging with JSON.stringify(), but these include BigInt members that fail. One such place is:

https://github.com/aws/aws-advanced-nodejs-wrapper/blob/c0a7320e282453a1f023a6d95466d93078d2134d/common/lib/utils/monitoring/monitor_service.ts#L211

There appear to be several other similar cases throughout monitor_service.ts.

Expected Behavior

No exceptions attempting to serialize BigInt.

What plugins are used? What other connection properties were set?

efm2

Current Behavior

Example stack trace:

TypeError: Do not know how to serialize a BigInt
at JSON.stringify ()
at MonitorServiceImpl.checkMonitors (file:///redacted/node_modules/aws-advanced-nodejs-wrapper/dist/common/lib/utils/monitoring/monitor_service.js:148:81)
at MonitorServiceImpl.runCleanupLoop (file:///redacted/node_modules/aws-advanced-nodejs-wrapper/dist/common/lib/utils/monitoring/monitor_service.js:106:18)
} reason: TypeError: Do not know how to serialize a BigInt
at JSON.stringify ()
at MonitorServiceImpl.checkMonitors (file:///redacted/node_modules/aws-advanced-nodejs-wrapper/dist/common/lib/utils/monitoring/monitor_service.js:148:81)
at MonitorServiceImpl.runCleanupLoop (file:///redacted/node_modules/aws-advanced-nodejs-wrapper/dist/common/lib/utils/monitoring/monitor_service.js:106:18)

Reproduction Steps

I don't have a quick reproducer since the issue seems to depend on the the monitoring state and activity. In my application, this sometimes happen after some period of inactivity or just before/after activity. I believe attempting to JSON.stringify() a BigInt is always an error unless the library were to provide a replacer function to JSON.stringify().

Possible Solution

Provide a replacer function to JSON.stringify() to handle the BigInt fields or perform some alternative serialization of the Monitor objects for logging.

Additional Information/Context

This is my first bug report here. Thanks for the great library.

The AWS Advanced NodeJs Wrapper version used

3.0.0

Node version used

24

Operating System and version

Rocky Linux 8.10

主要言語
TypeScript
スター
38
フォーク
17
平均マージ
7日 11時間
マージ済み PR(30日)
9

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/aws-advanced-nodejs-wrapper のほかの issue

aws/aws-advanced-nodejs-wrapper の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。