@deliciousmonster/datadog-agent-binary 7.82.1-next.2 → 7.82.1-next.3

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/README.md CHANGED
@@ -43,6 +43,7 @@ Configuration is the environment; `datadog.yaml` is rewritten on every start, so
43
43
  | `DD_ENV` | The `env` tag on everything sent. |
44
44
  | `DD_APM_RECEIVER_PORT` | Where `dd-trace` posts spans. Default 8126. |
45
45
  | `DD_EXPVAR_PORT`, `DD_APM_DEBUG_PORT` | The agents' expvar ports, 5000 and 5012. Verification reads them; `0` turns one off and verification refuses. |
46
+ | `DD_LOGS_ENABLED` | `true` ships Harper's own log, `<rootPath>/log/hdb.log`, as service `harper`. Off by default. |
46
47
 
47
48
  `GET /DatadogStatus/`, under Harper's own auth, reports which supervision is in charge, whether the API key is set, whether each agent verified and why not, and how far a span got: `delivery.verdict` is `delivering`, `rejected`, `traces-unconfirmed` or `idle`. Its counters are the trace-agent's own one-minute window, so read it twice.
48
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deliciousmonster/datadog-agent-binary",
3
- "version": "7.82.1-next.2",
3
+ "version": "7.82.1-next.3",
4
4
  "description": "Harper component that runs the Datadog trace-agent and core-agent alongside a node, with pre-built binaries installed per platform",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -27,7 +27,7 @@
27
27
  "test:windows": "npm run build && node scripts/windows-gate.mjs",
28
28
  "test:live": "npm run build && node --test \"test/live/**/*.test.js\"",
29
29
  "// test:binaries": "requires real binaries already built at build/<platform>/bin, from a prior `npm run build-agent` or a CI step that already built them; this script itself only runs `npm run build` (tsc), same as test:live for the same real-binaries dependency; excluded from `test` for that reason",
30
- "test:binaries": "npm run build && node --test \"test/binaries/**/*.test.js\""
30
+ "test:binaries": "npm run build && node --test --test-concurrency=1 --test-timeout=120000 \"test/binaries/**/*.test.js\""
31
31
  },
32
32
  "keywords": [
33
33
  "datadog",
@@ -68,10 +68,10 @@
68
68
  },
69
69
  "homepage": "https://github.com/deliciousmonster/datadog-agent-binary#readme",
70
70
  "optionalDependencies": {
71
- "@deliciousmonster/datadog-agent-binary-linux-x86_64": "7.82.1-next.2",
72
- "@deliciousmonster/datadog-agent-binary-linux-arm64": "7.82.1-next.2",
73
- "@deliciousmonster/datadog-agent-binary-macos-arm64": "7.82.1-next.2",
74
- "@deliciousmonster/datadog-agent-binary-windows-x86_64": "7.82.1-next.2"
71
+ "@deliciousmonster/datadog-agent-binary-linux-x86_64": "7.82.1-next.3",
72
+ "@deliciousmonster/datadog-agent-binary-linux-arm64": "7.82.1-next.3",
73
+ "@deliciousmonster/datadog-agent-binary-macos-arm64": "7.82.1-next.3",
74
+ "@deliciousmonster/datadog-agent-binary-windows-x86_64": "7.82.1-next.3"
75
75
  },
76
76
  "lint-staged": {
77
77
  "*.{ts,js,json}": [
package/runtime/config.js CHANGED
@@ -92,6 +92,22 @@ function renderDatadogYaml(paths, ports) {
92
92
  ].join("\n");
93
93
  }
94
94
 
95
+ const HARPER_LOG_CHECK = "harper.d";
96
+
97
+ /** A logs source for Harper's own log file: `logging.root` is `log` under the root path unless a node moved it. */
98
+ function renderHarperLogSource(logFile) {
99
+ return [
100
+ "# GENERATED by resources.js on every Harper worker start. Edits are overwritten.",
101
+ "# Tailed only while logs are enabled (DD_LOGS_ENABLED=true).",
102
+ "logs:",
103
+ " - type: file",
104
+ ` path: ${yamlString(logFile)}`,
105
+ " service: harper",
106
+ " source: harper",
107
+ "",
108
+ ].join("\n");
109
+ }
110
+
95
111
  /** The shipped core checks that apply here; an optional `platforms` file beside a check gates it, absent means everywhere. */
96
112
  function collectCoreChecks(packageConfd) {
97
113
  const checks = [];
@@ -162,7 +178,15 @@ export function prepareRuntime(componentDir, { ports, log }) {
162
178
  configFiles[join(paths.confd, check.dir, "conf.yaml.default")] =
163
179
  check.body;
164
180
  }
165
- removeStaleDefaults(paths.confd, new Set(checks.map((check) => check.dir)));
181
+ const owned = new Set(checks.map((check) => check.dir));
182
+ // Harper's own log as a log source, written whenever the root is known. The agent tails it only
183
+ // when logs are on, which is DD_LOGS_ENABLED=true in the environment; off, this file costs nothing.
184
+ if (root) {
185
+ configFiles[join(paths.confd, HARPER_LOG_CHECK, "conf.yaml.default")] =
186
+ renderHarperLogSource(join(root, "log", "hdb.log"));
187
+ owned.add(HARPER_LOG_CHECK);
188
+ }
189
+ removeStaleDefaults(paths.confd, owned);
166
190
  } catch (error) {
167
191
  log.warn(
168
192
  `Datadog supervisor: no core check configuration was collected (${error.message}), so the agent ` +