Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions packages/opencensus-core/src/metrics/export/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export interface TimeSeries {
* interval (start_timestamp, timestamp]. If not specified, the backend can
* use the previous recorded value.
*/
readonly startTimestamp: Timestamp;
readonly startTimestamp: number|null;
/**
* The set of label values that uniquely identify this timeseries. Applies to
* all points. The order of label values must match that of label keys in the
Expand All @@ -147,7 +147,7 @@ export interface Point {
* The moment when this point was recorded. Inclusive.
* If not specified, the timestamp will be decided by the backend.
*/
readonly timestamp: Timestamp;
readonly timestamp: number;
/**
* The actual point value.
* 64-bit integer or 64-bit double-precision floating-point number
Expand Down Expand Up @@ -253,7 +253,7 @@ export interface Exemplar {
*/
readonly value: number;
/** The observation (sampling) time of the above value. */
readonly timestamp: Timestamp;
readonly timestamp: number;
/** Contextual information about the example value. */
readonly attachments: {[key: string]: string};
}
Expand Down Expand Up @@ -309,19 +309,3 @@ export interface ValueAtPercentile {
/** The value at the given percentile of a distribution. */
readonly value: number;
}

export interface Timestamp {
/**
* Represents seconds of UTC time since Unix epoch
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
*/
seconds: number|null;
/**
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
*/
nanos: number|null;
}