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 0257c5a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions experimental/packages/api-events/src/types/Event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
* limitations under the License.
*/

import { Attributes } from '@opentelemetry/api';
import { LogAttributeValue } from '@opentelemetry/api-logs';
import { AttributeValue, Attributes } from '@opentelemetry/api';
import { LogAttributes } from '@opentelemetry/api-logs';

export type EventDataValue = AttributeValue | LogAttributes;

export interface Event {
/**
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 0257c5a

Please sign in to comment.