diff --git a/CHANGELOG.md b/CHANGELOG.md index 22ce796f14..2a17af1e32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/ ### :bug: (Bug Fix) +* fix(api-logs): allow for TimeInput type for LogRecord timestamps [#4345](https://github.com/open-telemetry/opentelemetry-js/pull/4345) * fix(sdk-trace-web): only access location if it is defined [#4063](https://github.com/open-telemetry/opentelemetry-js/pull/4063) * fix(sdk-trace-base): processor onStart called with a span having empty attributes diff --git a/experimental/packages/api-logs/src/types/LogRecord.ts b/experimental/packages/api-logs/src/types/LogRecord.ts index 59718aa30b..69dd14f7cb 100644 --- a/experimental/packages/api-logs/src/types/LogRecord.ts +++ b/experimental/packages/api-logs/src/types/LogRecord.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { AttributeValue, Context } from '@opentelemetry/api'; +import { AttributeValue, Context, TimeInput } from '@opentelemetry/api'; export type LogAttributeValue = AttributeValue | LogAttributes; export interface LogAttributes { @@ -53,12 +53,12 @@ export interface LogRecord { /** * The time when the log record occurred as UNIX Epoch time in nanoseconds. */ - timestamp?: number; + timestamp?: TimeInput; /** * Time when the event was observed by the collection system. */ - observedTimestamp?: number; + observedTimestamp?: TimeInput; /** * Numerical value of the severity.