autotel-backends 2.14.2 → 2.14.4
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/dist/grafana.cjs +13 -11
- package/dist/grafana.js +13 -11
- package/package.json +2 -2
package/dist/grafana.cjs
CHANGED
|
@@ -61,17 +61,19 @@ function createGrafanaConfig(config) {
|
|
|
61
61
|
headers,
|
|
62
62
|
metrics: true
|
|
63
63
|
};
|
|
64
|
-
if (enableLogs)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
if (enableLogs) {
|
|
65
|
+
if (logRecordProcessors) result.logRecordProcessors = logRecordProcessors;
|
|
66
|
+
else try {
|
|
67
|
+
const pkgRequire = (0, node_module.createRequire)(typeof __filename === "string" ? __filename : require("url").pathToFileURL(__filename).href);
|
|
68
|
+
const { BatchLogRecordProcessor } = pkgRequire("@opentelemetry/sdk-logs");
|
|
69
|
+
const { OTLPLogExporter } = pkgRequire("@opentelemetry/exporter-logs-otlp-http");
|
|
70
|
+
result.logRecordProcessors = [new BatchLogRecordProcessor({ exporter: new OTLPLogExporter({
|
|
71
|
+
url: logsUrl,
|
|
72
|
+
headers
|
|
73
|
+
}) })];
|
|
74
|
+
} catch {
|
|
75
|
+
throw new Error("Log export requires @opentelemetry/sdk-logs and @opentelemetry/exporter-logs-otlp-http. Install them or set enableLogs: false. Note they are loaded through createRequire, which bundlers (Vercel, Nitro, esbuild) do not follow, so a bundled app needs them as direct dependencies even when they resolve locally. Passing your own logRecordProcessors avoids the lazy require entirely.");
|
|
76
|
+
}
|
|
75
77
|
}
|
|
76
78
|
return result;
|
|
77
79
|
}
|
package/dist/grafana.js
CHANGED
|
@@ -60,17 +60,19 @@ function createGrafanaConfig(config) {
|
|
|
60
60
|
headers,
|
|
61
61
|
metrics: true
|
|
62
62
|
};
|
|
63
|
-
if (enableLogs)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
if (enableLogs) {
|
|
64
|
+
if (logRecordProcessors) result.logRecordProcessors = logRecordProcessors;
|
|
65
|
+
else try {
|
|
66
|
+
const pkgRequire = createRequire(typeof __filename === "string" ? __filename : import.meta.url);
|
|
67
|
+
const { BatchLogRecordProcessor } = pkgRequire("@opentelemetry/sdk-logs");
|
|
68
|
+
const { OTLPLogExporter } = pkgRequire("@opentelemetry/exporter-logs-otlp-http");
|
|
69
|
+
result.logRecordProcessors = [new BatchLogRecordProcessor({ exporter: new OTLPLogExporter({
|
|
70
|
+
url: logsUrl,
|
|
71
|
+
headers
|
|
72
|
+
}) })];
|
|
73
|
+
} catch {
|
|
74
|
+
throw new Error("Log export requires @opentelemetry/sdk-logs and @opentelemetry/exporter-logs-otlp-http. Install them or set enableLogs: false. Note they are loaded through createRequire, which bundlers (Vercel, Nitro, esbuild) do not follow, so a bundled app needs them as direct dependencies even when they resolve locally. Passing your own logRecordProcessors avoids the lazy require entirely.");
|
|
75
|
+
}
|
|
74
76
|
}
|
|
75
77
|
return result;
|
|
76
78
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autotel-backends",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.4",
|
|
4
4
|
"description": "Vendor backend configurations for Autotel (Honeycomb, Datadog, etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"author": "Jag Reehal <jag@jagreehal.com> (https://jagreehal.com)",
|
|
73
73
|
"license": "Apache-2.0",
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"autotel": "7.
|
|
75
|
+
"autotel": "7.9.0",
|
|
76
76
|
"@opentelemetry/exporter-logs-otlp-http": ">=0.221.0",
|
|
77
77
|
"@opentelemetry/sdk-logs": ">=0.221.0"
|
|
78
78
|
},
|