@trigger.dev/core-backend
Advanced tools
Comparing version 0.0.0-nestfix-20240322145612 to 0.0.0-openai-v2-prerelease-20240606204146
@@ -16,2 +16,3 @@ declare class BloomFilter { | ||
constructor(name: string, level?: LogLevel, filteredKeys?: string[], jsonReplacer?: (key: string, value: unknown) => unknown, additionalFields?: () => Record<string, unknown>); | ||
child(fields: Record<string, unknown>): Logger; | ||
filter(...keys: string[]): Logger; | ||
@@ -18,0 +19,0 @@ static satisfiesLogLevel(logLevel: LogLevel, setLevel: LogLevel): boolean; |
@@ -5,2 +5,3 @@ 'use strict'; | ||
var node_process = require('node:process'); | ||
var api = require('@opentelemetry/api'); | ||
@@ -107,2 +108,8 @@ var __defProp = Object.defineProperty; | ||
} | ||
child(fields) { | ||
return new _Logger(__privateGet(this, _name), logLevels[__privateGet(this, _level)], __privateGet(this, _filteredKeys), __privateGet(this, _jsonReplacer), () => ({ | ||
...__privateGet(this, _additionalFields).call(this), | ||
...fields | ||
})); | ||
} | ||
// Return a new Logger instance with the same name and a new log level | ||
@@ -149,2 +156,3 @@ // but filter out the keys from the log messages (at any level) | ||
structuredLog_fn = /* @__PURE__ */ __name(function(loggerFunction, message, level, ...args) { | ||
const currentSpan = api.trace.getSpan(api.context.active()); | ||
const structuredLog = { | ||
@@ -156,3 +164,5 @@ ...structureArgs(safeJsonClone(args), __privateGet(this, _filteredKeys)), | ||
message, | ||
level | ||
level, | ||
traceId: currentSpan && currentSpan.isRecording() ? currentSpan?.spanContext().traceId : void 0, | ||
parentSpanId: currentSpan && currentSpan.isRecording() ? currentSpan?.spanContext().spanId : void 0 | ||
}; | ||
@@ -159,0 +169,0 @@ loggerFunction(JSON.stringify(structuredLog, __privateGet(this, _jsonReplacer))); |
{ | ||
"name": "@trigger.dev/core-backend", | ||
"version": "0.0.0-nestfix-20240322145612", | ||
"version": "0.0.0-openai-v2-prerelease-20240606204146", | ||
"description": "Core code used across `@trigger.dev/sdk` and Trigger.dev server", | ||
@@ -35,4 +35,4 @@ "license": "MIT", | ||
"typescript": "^5.3.0", | ||
"@trigger.dev/tsconfig": "0.0.0", | ||
"@trigger.dev/tsup": "0.0.0" | ||
"@trigger.dev/tsup": "0.0.0", | ||
"@trigger.dev/tsconfig": "0.0.0" | ||
}, | ||
@@ -42,2 +42,5 @@ "engines": { | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/api": "^1.8.0" | ||
}, | ||
"scripts": { | ||
@@ -44,0 +47,0 @@ "clean": "rimraf dist", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
50600
528
0
1
+ Added@opentelemetry/api@^1.8.0
+ Added@opentelemetry/api@1.9.0(transitive)