Skip to content

Commit c231b80

Browse files
committed
Cleanup usage of TimestampUnixNanos and its API
Updates #2488 Important Changes: * Rename pdata.TimestampUnixNanos to pdata.Timestamp * Remove pdata.TimestampUnixNanos and helpers, move them of the pdata.Timestamp type. * Fix bug around IsZero, this function should return true if the time is January 1, year 1, 00:00:00 UTC not epoch. Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
1 parent 7d7ae2e commit c231b80

File tree

68 files changed

+318
-332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+318
-332
lines changed

consumer/pdata/common.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,10 @@ package pdata
1919

2020
import (
2121
"sort"
22-
"time"
2322

2423
otlpcommon "go.opentelemetry.io/collector/internal/data/protogen/common/v1"
2524
)
2625

27-
// TimestampUnixNano is a time specified as UNIX Epoch time in nanoseconds since
28-
// 00:00:00 UTC on 1 January 1970.
29-
type TimestampUnixNano uint64
30-
31-
func (ts TimestampUnixNano) String() string {
32-
return time.Unix(0, int64(ts)).String()
33-
}
34-
3526
// AttributeValueType specifies the type of AttributeValue.
3627
type AttributeValueType int
3728

consumer/pdata/generated_log.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

consumer/pdata/generated_log_test.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

consumer/pdata/generated_metrics.go

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)