Skip to content

Commit

Permalink
added dedicated type for event data field
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkuba committed Mar 25, 2024
1 parent f0cc15e commit 0053c00
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions experimental/packages/api-events/src/types/Event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import { Attributes } from '@opentelemetry/api';
import { LogAttributeValue } from '@opentelemetry/api-logs';

export type EventDataValue = LogAttributeValue;

export interface Event {
/**
* The time when the event occurred as UNIX Epoch time in nanoseconds.
Expand All @@ -29,10 +31,10 @@ export interface Event {
name: string;

/**
* Attributes that describe the event.
* Data that describes the event.
* Intended to be used by instrumentation libraries.
*/
data?: LogAttributeValue;
data?: EventDataValue;

/**
* Additional attributes that describe the event.
Expand Down

0 comments on commit 0053c00

Please sign in to comment.