@frontmcp/observability 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.mjs +5 -1
- package/esm/package.json +3 -3
- package/index.js +5 -1
- package/logging/sinks/stdout.sink.d.ts +4 -0
- package/package.json +3 -3
package/esm/index.mjs
CHANGED
|
@@ -341,9 +341,13 @@ import {
|
|
|
341
341
|
} from "@frontmcp/sdk";
|
|
342
342
|
|
|
343
343
|
// libs/observability/src/logging/sinks/stdout.sink.ts
|
|
344
|
+
function defaultStream() {
|
|
345
|
+
const flag = typeof process !== "undefined" ? process.env?.["FRONTMCP_STDIO"] : void 0;
|
|
346
|
+
return flag === "1" || flag === "true" ? process.stderr : process.stdout;
|
|
347
|
+
}
|
|
344
348
|
var StdoutSink = class {
|
|
345
349
|
constructor(options) {
|
|
346
|
-
this.stream = options?.stream ??
|
|
350
|
+
this.stream = options?.stream ?? defaultStream();
|
|
347
351
|
this.pretty = options?.pretty ?? false;
|
|
348
352
|
}
|
|
349
353
|
write(entry) {
|
package/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/observability",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "OpenTelemetry instrumentation, structured JSON logging, and request log objects for FrontMCP",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@opentelemetry/api": "^1.9.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@frontmcp/sdk": "1.8.
|
|
55
|
-
"@frontmcp/utils": "1.8.
|
|
54
|
+
"@frontmcp/sdk": "1.8.1",
|
|
55
|
+
"@frontmcp/utils": "1.8.1",
|
|
56
56
|
"@opentelemetry/exporter-trace-otlp-http": "^0.219.0",
|
|
57
57
|
"@opentelemetry/sdk-node": "^0.219.0",
|
|
58
58
|
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
package/index.js
CHANGED
|
@@ -403,9 +403,13 @@ var import_api16 = require("@opentelemetry/api");
|
|
|
403
403
|
var import_sdk2 = require("@frontmcp/sdk");
|
|
404
404
|
|
|
405
405
|
// libs/observability/src/logging/sinks/stdout.sink.ts
|
|
406
|
+
function defaultStream() {
|
|
407
|
+
const flag = typeof process !== "undefined" ? process.env?.["FRONTMCP_STDIO"] : void 0;
|
|
408
|
+
return flag === "1" || flag === "true" ? process.stderr : process.stdout;
|
|
409
|
+
}
|
|
406
410
|
var StdoutSink = class {
|
|
407
411
|
constructor(options) {
|
|
408
|
-
this.stream = options?.stream ??
|
|
412
|
+
this.stream = options?.stream ?? defaultStream();
|
|
409
413
|
this.pretty = options?.pretty ?? false;
|
|
410
414
|
}
|
|
411
415
|
write(entry) {
|
|
@@ -5,6 +5,10 @@ import type { StructuredLogEntry } from '../structured-log.types';
|
|
|
5
5
|
*
|
|
6
6
|
* 12-factor compliant: logs are written as a stream of events to stdout,
|
|
7
7
|
* ready for collection by Docker, K8s, CloudWatch, or any log aggregator.
|
|
8
|
+
*
|
|
9
|
+
* Under `FRONTMCP_STDIO` the default target moves to stderr, which keeps the aggregator working
|
|
10
|
+
* while leaving stdout to the protocol. An explicit `stream` is always honoured — a caller naming
|
|
11
|
+
* a target has said what they want.
|
|
8
12
|
*/
|
|
9
13
|
export declare class StdoutSink implements LogSink {
|
|
10
14
|
private readonly stream;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/observability",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "OpenTelemetry instrumentation, structured JSON logging, and request log objects for FrontMCP",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@opentelemetry/api": "^1.9.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@frontmcp/sdk": "1.8.
|
|
55
|
-
"@frontmcp/utils": "1.8.
|
|
54
|
+
"@frontmcp/sdk": "1.8.1",
|
|
55
|
+
"@frontmcp/utils": "1.8.1",
|
|
56
56
|
"@opentelemetry/exporter-trace-otlp-http": "^0.219.0",
|
|
57
57
|
"@opentelemetry/sdk-node": "^0.219.0",
|
|
58
58
|
"@opentelemetry/sdk-trace-base": "^2.8.0",
|