Skip to content

Commit

Permalink
🐛 remove readonly from all LogsEvent properties (#1198)
Browse files Browse the repository at this point in the history
* 🐛 fix LogsEvent type to update readyonly property by using beforeSend callback

* 🐛 change most of the readonly properties to mutable

* 🐛 remove readonly from all properties

Co-authored-by: Bastien Caudan <bastien.caudan@datadoghq.com>
  • Loading branch information
kotarella1110 and bcaudan committed Dec 7, 2021
1 parent ae1b310 commit 3aed00c
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions packages/logs/src/logsEvent.types.ts
Expand Up @@ -2,31 +2,31 @@ export interface LogsEvent {
/**
* Start of the log in ms from epoch
*/
readonly date: number
date: number
/**
* The log message
*/
message: string
/**
* The log status
*/
readonly status: 'debug' | 'info' | 'warn' | 'error'
status: 'debug' | 'info' | 'warn' | 'error'
/**
* UUID of the application
*/
readonly application_id?: string
application_id?: string
/**
* The service name
*/
readonly service?: string
service?: string
/**
* UUID of the session
*/
readonly session_id?: string
session_id?: string
/**
* View properties
*/
readonly view: {
view: {
/**
* URL that linked to the initial view of the page
*/
Expand All @@ -38,33 +38,33 @@ export interface LogsEvent {
/**
* UUID of the view
*/
readonly id?: string
id?: string

[k: string]: unknown
}
/**
* Logger properties
*/
readonly logger?: {
logger?: {
/**
* Name of the logger
*/
readonly name: string
name: string

[k: string]: unknown
}
/**
* Error properties
*/
readonly error?: {
error?: {
/**
* Kind of the error
*/
readonly kind?: string
kind?: string
/**
* Origin of the error
*/
readonly origin: 'network' | 'source' | 'console' | 'logger' | 'agent' | 'custom'
origin: 'network' | 'source' | 'console' | 'logger' | 'agent' | 'custom'
/**
* Stacktrace of the error
*/
Expand All @@ -75,15 +75,15 @@ export interface LogsEvent {
/**
* Resource properties of the error
*/
readonly http: {
http: {
/**
* HTTP method of the resource
*/
readonly method: 'POST' | 'GET' | 'HEAD' | 'PUT' | 'DELETE' | 'PATCH'
method: 'POST' | 'GET' | 'HEAD' | 'PUT' | 'DELETE' | 'PATCH'
/**
* HTTP Status code of the resource
*/
readonly status_code: number
status_code: number
/**
* URL of the resource
*/
Expand Down

0 comments on commit 3aed00c

Please sign in to comment.