Datadog analysis logs read millisecond timestamps as seconds

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

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

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
observability

調査の方向性

まず pkg/app/pipedv1/plugin/analysis/analysisprovider/metrics/datadog/datadog.go の Datadog プロバイダーのポイント変換と、pkg/app/piped/analysisprovider/metrics/datadog/ 配下の対応するファイルを確認し、その後 analysisprovider/metrics/provider.go の DataPoint.String フォーマッターを確認してください。pointlist [[1681683300000, 2]] を使ったプロバイダーのテストを書き、フォーマットされた時刻を確認します。両方のプロバイダーで 2023-04-16 22:15:00 UTC と表示され、THRESHOLD の失敗ログが一致すれば完了です。

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

説明

What happened

An ANALYSIS threshold check correctly rejects a Datadog sample from 2023-04-16 22:15:00 UTC, but the failure log dates the sample 55260-06-03 02:00:00 UTC.

Datadog returns milliseconds in pointlist. The provider copies that timestamp into DataPoint.Timestamp, which the stage log formats as Unix seconds. Datadog API response example · pipedv1 conversion · pipedv0 conversion · Timestamp formatter

What you expected to happen

The failure log shows the sample's UTC time as 2023-04-16 22:15:00 UTC.

How to reproduce it

  1. In the Datadog provider test, mock a successful query response with one series, length: 1, and pointlist: [[1681683300000, 2]].
  2. Call QueryPoints and format the returned sample with DataPoint.String(). The formatted year is 55260.
  3. Feed the point into a THRESHOLD check with expected.max: 1. The failure log prints the same date.

Local Go tests reproduced the timestamp conversion in both providers and captured the threshold failure log in pipedv1.

Environment

pipedv0 and pipedv1 analysis source at 87c6da5e7. The tests used a mocked Datadog response.

主要言語
Go
スター
1.4k
フォーク
391
平均マージ
4日 1時間
マージ済み PR(30日)
58

環境構築

はじめの一歩

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

pipe-cd/pipecd のほかの issue

pipe-cd/pipecd の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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