Datadog analysis logs read millisecond timestamps as seconds

Đang mở Phù hợp với người mới
#7,625 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
observability

Hướng nghiên cứu

Bắt đầu với phần chuyển đổi điểm dữ liệu của nhà cung cấp Datadog trong pkg/app/pipedv1/plugin/analysis/analysisprovider/metrics/datadog/datadog.go và tệp tương ứng trong pkg/app/piped/analysisprovider/metrics/datadog/, sau đó đến bộ định dạng DataPoint.String trong analysisprovider/metrics/provider.go. Viết một bài kiểm thử nhà cung cấp với pointlist [[1681683300000, 2]] và kiểm tra thời gian đã định dạng. Hoàn thành khi cả hai nhà cung cấp đều hiển thị 2023-04-16 22:15:00 UTC và log lỗi THRESHOLD khớp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
1.4k
Fork
391
Merge trung bình
4 ngày 1 giờ
Pull request đã merge (30 ngày)
58

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pipe-cd/pipecd

Tất cả issue của pipe-cd/pipecd

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.