Skip to content

Commit

Permalink
fix(api-logs): allow passing in TimeInput for LogRecord (#4345)
Browse files Browse the repository at this point in the history
* fix: allow passing in TimeInput for LogRecord

* chore: update changelog
  • Loading branch information
seemk authored Dec 6, 2023
1 parent dcf93e8 commit 104a5e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions experimental/packages/api-logs/src/types/LogRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 104a5e8

Please sign in to comment.