Clarify types

(cherry picked from commit 422b150deb158a70ef37e8a456d91bf26cd0b1bc)
This commit is contained in:
Eric Bailey
2025-02-28 11:50:19 -06:00
parent 67d54b7c00
commit 9c6509d17e
3 changed files with 7 additions and 4 deletions
-1
View File
@@ -18,7 +18,6 @@ export const bitdriftTransport: Transport = (
) => {
const log = logFunctions[level]
log(message.toString(), {
// match Sentry payload
__context__: context,
...prepareMetadata(metadata),
})
-1
View File
@@ -11,7 +11,6 @@ export const sentryTransport: Transport = (
timestamp,
) => {
const meta = {
// match Bitdrift payload
__context__: context,
...prepareMetadata(metadata),
}
+7 -2
View File
@@ -5,11 +5,16 @@
*/
export enum LogContext {
Default = 'logger',
Metric = 'metric',
Session = 'session',
Notifications = 'notifications',
ConversationAgent = 'conversation-agent',
DMsAgent = 'dms-agent',
/**
* METRIC IS FOR INTERNAL USE ONLY, don't create any other loggers using this
* context
*/
Metric = 'metric',
}
export enum LogLevel {
@@ -34,7 +39,7 @@ export type Transport = (
*/
export type Metadata = {
/**
* Reserved for appending `LogContext` to logging payloads
* Reserved for appending `LogContext` in logging payloads
*/
__context__?: undefined