@deliciousmonster/datadog-agent-binary 7.82.1-next.0
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/LICENSE +202 -0
- package/README.md +138 -0
- package/conf.d/cpu.d/conf.yaml.default +11 -0
- package/conf.d/disk.d/conf.yaml.default +15 -0
- package/conf.d/file_handle.d/conf.yaml.default +11 -0
- package/conf.d/io.d/conf.yaml.default +12 -0
- package/conf.d/load.d/conf.yaml.default +6 -0
- package/conf.d/load.d/platforms +4 -0
- package/conf.d/memory.d/conf.yaml.default +10 -0
- package/conf.d/network.d/conf.yaml.default +10 -0
- package/conf.d/network.d/platforms +4 -0
- package/conf.d/uptime.d/conf.yaml.default +6 -0
- package/config.yaml +11 -0
- package/package.json +81 -0
- package/resources.js +288 -0
- package/runtime/agent-exit.js +60 -0
- package/runtime/binary.js +61 -0
- package/runtime/config.js +195 -0
- package/runtime/delivery.js +137 -0
- package/runtime/probe.js +115 -0
- package/runtime/supervisor.js +172 -0
- package/runtime/verify.js +190 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2025 HarperDB, Inc.
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# @deliciousmonster/datadog-agent-binary
|
|
2
|
+
|
|
3
|
+
[](https://github.com/deliciousmonster/datadog-agent-binary/actions/workflows/build-release.yml)
|
|
4
|
+
|
|
5
|
+
A Harper v5 plugin that runs the Datadog core agent and trace-agent alongside a node, so host metrics and the spans the host application's own `dd-trace` produces reach Datadog. `dd-trace` itself is the application's, not shipped here. Both agents arrive as pre-compiled binaries, one npm package per platform, picked by `optionalDependencies`; nothing is downloaded at install time and no install script runs.
|
|
6
|
+
|
|
7
|
+
The binaries are how the plugin does its job, not a product of their own. Running them outside a Harper node is not a surface this package supports.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @deliciousmonster/datadog-agent-binary
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
npm fetches only the platform package whose `os`/`cpu` match the host, so one agent pair arrives with the install. Two things in the node's own config then decide whether either agent starts.
|
|
16
|
+
|
|
17
|
+
### Name it in the root config
|
|
18
|
+
|
|
19
|
+
Harper hands a component a `Scope`, and so calls this plugin at all, only for one the node's root `harper-config.yaml` names. A directory it found by scanning `componentsRoot` loads, serves its resources and supervises nothing. The file is the one `settings_path` names in `~/.harperdb/hdb_boot_properties.file`, and the key is the component directory's own name, because a root entry resolves to `<componentsRoot>/<key>`:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
datadog-agent-binary: { package: "@deliciousmonster/datadog-agent-binary" }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Sixty seconds after the module loads with no plugin call, the component logs the entry it needs and the reason nothing started.
|
|
26
|
+
|
|
27
|
+
### Allowlist both binaries
|
|
28
|
+
|
|
29
|
+
Harper only lets a component spawn an executable listed by its exact absolute path in `applications.allowedSpawnCommands`. The other half of that gate, a `name` option on every spawn, the plugin passes itself. Two binaries launch here, not one:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
ls -d "$PWD"/node_modules/@deliciousmonster/datadog-agent-binary-*/bin/*
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
applications:
|
|
37
|
+
allowedSpawnCommands:
|
|
38
|
+
- node
|
|
39
|
+
- /app/node_modules/@deliciousmonster/datadog-agent-binary-linux-x86_64/bin/datadog-agent
|
|
40
|
+
- /app/node_modules/@deliciousmonster/datadog-agent-binary-linux-x86_64/bin/trace-agent
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
A bare command name matches neither one. The paths carry no version, so an upgrade leaves them where they are; on Windows both end `.exe`. Keep `node` in the list too: where Harper does not supervise natively, the bundled guard spawns its reaper as `process.execPath` and then as a bare `node`, and a reaper that cannot start leaves the agents running after the node stops.
|
|
44
|
+
|
|
45
|
+
Harper installs with `--ignore-scripts`, which costs this package nothing. `applications.allowInstallScripts` can stay off.
|
|
46
|
+
|
|
47
|
+
## Configure
|
|
48
|
+
|
|
49
|
+
The plugin does not configure Datadog. What follows is read from the environment, and `datadog.yaml` is rendered fresh on every worker start, so editing that file changes nothing.
|
|
50
|
+
|
|
51
|
+
| Variable | Effect |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| `DD_API_KEY` | Measured on 7.82.1: without it the core agent starts and collects while the intake refuses every payload with a 403, and the trace-agent exits at once with "you must specify an API Key", binding no receiver. |
|
|
54
|
+
| `DD_SITE` | Destination site, e.g. `datadoghq.eu`. Datadog's own default is `datadoghq.com`. |
|
|
55
|
+
| `DD_ENV` | The `env` tag on everything sent. |
|
|
56
|
+
| `DD_APM_RECEIVER_PORT` | Where `dd-trace` posts spans. Default 8126. |
|
|
57
|
+
| `DD_EXPVAR_PORT` | The core agent's expvar. Default 5000. |
|
|
58
|
+
| `DD_APM_DEBUG_PORT` | The trace-agent's own expvar. Default 5012. |
|
|
59
|
+
|
|
60
|
+
`DD_API_KEY` and `DD_SITE` are never written to disk; both agents read them from the inherited environment. Those two and `DD_ENV` are also part of the fingerprint each agent's PID lock carries, so changing one makes the next worker start take the lock and SIGTERM the agent still running under the old value.
|
|
61
|
+
|
|
62
|
+
Setting a port to `0` turns that endpoint off, and each one is load-bearing. Without the receiver `dd-trace` drops every span; without either expvar nothing can show that the process holding the port is the one this node started, and startup verification refuses rather than reporting healthy.
|
|
63
|
+
|
|
64
|
+
## Diagnose
|
|
65
|
+
|
|
66
|
+
Everything the plugin writes lands under `<rootPath>/datadog/<component directory>/`, with `rootPath` read from the node's own config chain, or from `ROOTPATH` where that is absolute. When no root resolves it falls back to `~/.harper-datadog/<component directory>/`. Under either root:
|
|
67
|
+
|
|
68
|
+
| Path | What it holds |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| `datadog.yaml` | The config both agents read. |
|
|
71
|
+
| `conf.d/` | The core checks this platform gets. Without them the core agent runs, reports healthy and collects no host metrics. |
|
|
72
|
+
| `logs/agent.log`, `logs/trace-agent.log` | The agents' own logs. `log_to_console` is off, so none of this reaches the container's stdout. |
|
|
73
|
+
| `logs/reaper.log` | The guard's reaper, where Harper is not supervising natively. |
|
|
74
|
+
| `pids/` | One lock per agent, which is what holds a node to one agent pair rather than one trace-agent per worker thread. Clear it when a killed node leaves a stale lock behind. |
|
|
75
|
+
|
|
76
|
+
The directory is named for the component, not just `datadog`: two installed copies sharing one `pids/` would share one lock.
|
|
77
|
+
|
|
78
|
+
`GET /DatadogStatus/` is the plugin's one resource and takes Harper's own auth. It re-reads process state and the trace-agent's delivery counters on each request rather than replaying what boot found. Read in this order:
|
|
79
|
+
|
|
80
|
+
- `supervision` is `harper` when the node's `Scope` carries the process sidecar API, `guard` when the bundled guard is holding the agents up instead.
|
|
81
|
+
- `apiKey` is `set` or `MISSING`, never the value.
|
|
82
|
+
- `processes[].verified` is a verdict on identity, not on liveness. The trace-agent's is taken by reading its expvar off the debug port and comparing the pid published there against the pid this node spawned, so something else holding the receiver port fails it rather than passing as healthy. `verifyDetail` names the case.
|
|
83
|
+
- `delivery.verdict` is how far a span got. `delivering` and `rejected` are evidence either way; `traces-unconfirmed` means the stats hop landed and the trace hop is unproven. Every counter behind it is a one-minute window the agent resets, so read it twice before believing it.
|
|
84
|
+
|
|
85
|
+
The agents answer directly too, which is the check that does not depend on the plugin:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
curl -s http://127.0.0.1:8126/info # the APM receiver, at DD_APM_RECEIVER_PORT
|
|
89
|
+
curl -s http://127.0.0.1:5000/debug/vars # the core agent's expvar, at DD_EXPVAR_PORT
|
|
90
|
+
curl -sk https://127.0.0.1:5012/debug/vars # the trace-agent's expvar, at DD_APM_DEBUG_PORT
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The last takes `-k` because the trace-agent serves its debug port under the self-signed IPC certificate it writes into `run/`.
|
|
94
|
+
|
|
95
|
+
## Supported platforms
|
|
96
|
+
|
|
97
|
+
| OS | Architecture | Status |
|
|
98
|
+
| --- | --- | --- |
|
|
99
|
+
| Linux | x86_64 | yes |
|
|
100
|
+
| Linux | arm64 | yes |
|
|
101
|
+
| Windows | x86_64 | yes |
|
|
102
|
+
| Windows | arm64 | no |
|
|
103
|
+
| macOS | x86_64 | no |
|
|
104
|
+
| macOS | arm64 | yes |
|
|
105
|
+
|
|
106
|
+
Windows arm64 waits on [Chocolatey](https://chocolatey.org) supporting arm64 natively. macOS x86_64 is out because GitHub retired the Intel runner, and a target with no leg in the release matrix publishes an optional dependency npm skips in silence.
|
|
107
|
+
|
|
108
|
+
## Building from source (maintainers)
|
|
109
|
+
|
|
110
|
+
This is how the published binaries are made; consumers do not need it. The build CLI is not in the published tarball, so it runs from a checkout, and it shells out to `dda`, `go` and `pip`, which belong in a developer shell or a CI runner rather than inside a Harper-managed process.
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npm run build-agent # current platform, at the version .datadog-agent-version pins
|
|
114
|
+
node dist/src/cli.js platforms # supported platforms
|
|
115
|
+
node dist/src/cli.js version # latest upstream version
|
|
116
|
+
|
|
117
|
+
# a version other than the pin
|
|
118
|
+
npm run build && node dist/src/cli.js build --datadog-version 7.50.0
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Requires Go 1.23, Python 3.12, CMake, Git, a C toolchain, and the Node in `engines` (22.18+ or 24+).
|
|
122
|
+
|
|
123
|
+
Output goes to `build/<platform>/` under the directory you run from: `src/` is the clone, `go/` the GOPATH it is symlinked into, `bin/` the built binaries. No flag moves it, because `scripts/create-platform-packages.js` reads the binaries back out of that path.
|
|
124
|
+
|
|
125
|
+
Publishing is gated on the packed tarball rather than the working tree: both binaries present in every platform package, each carrying its required symbol and free of the Go build tag `--build-exclude` is there to drop.
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npm test # component and e2e tiers
|
|
129
|
+
npm run typecheck
|
|
130
|
+
npm run test:binaries # needs real binaries from a prior build-agent
|
|
131
|
+
npm run test:live # boots a real node; released Harper is pinned at 5.2.9, and the
|
|
132
|
+
# native-supervision row needs DD_LIVE_HARPER_NATIVE set to a
|
|
133
|
+
# Harper worktree whose Scope carries scope.processes
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## License
|
|
137
|
+
|
|
138
|
+
Apache License 2.0. The agent binaries built and distributed here are Apache 2.0 as specified in the [Datadog Agent repository](https://github.com/DataDog/datadog-agent), and the datadog-agent source is copyright Datadog, Inc.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# system.cpu.* - user, system, idle, iowait, steal, guest, and num_cores.
|
|
2
|
+
#
|
|
3
|
+
# Upstream ships this as cpu.d/conf.yaml.default with every option commented out, so the
|
|
4
|
+
# effective instance is the empty one below. cmd/agent/dist/conf.d/cpu.d/conf.yaml.default in
|
|
5
|
+
# the Datadog source is the full option list; report_total_percpu is the only one, and it turns
|
|
6
|
+
# one series into one per core.
|
|
7
|
+
|
|
8
|
+
init_config:
|
|
9
|
+
|
|
10
|
+
instances:
|
|
11
|
+
- {}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# system.disk.* and system.fs.inodes.*, one set of series per partition.
|
|
2
|
+
#
|
|
3
|
+
# use_mount tags by mount point instead of device; false is what upstream ships and what the
|
|
4
|
+
# Datadog integration tile expects.
|
|
5
|
+
#
|
|
6
|
+
# The defaults enumerate every partition the platform reports, pseudo-filesystems included, so
|
|
7
|
+
# in a container this covers the overlay and the tmpfs mounts as well as the data volume. That
|
|
8
|
+
# is upstream's behaviour and the series are cheap, but if the tag cardinality matters, the
|
|
9
|
+
# knobs are include_all_devices, mount_point_exclude, and file_system_exclude. The full option
|
|
10
|
+
# list is cmd/agent/dist/conf.d/disk.d/conf.yaml.default in the Datadog source.
|
|
11
|
+
|
|
12
|
+
init_config:
|
|
13
|
+
|
|
14
|
+
instances:
|
|
15
|
+
- use_mount: false
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# system.fs.file_handles.used and .max.
|
|
2
|
+
#
|
|
3
|
+
# Shipped on macOS as well, unlike upstream's package, which deletes file_handle.d there. The
|
|
4
|
+
# check has a darwin implementation (file_handles_bsd.go, built for freebsd || darwin) and it
|
|
5
|
+
# runs: only the packaging omits it. Running out of descriptors is a real way for a database
|
|
6
|
+
# node to fail, and it fails the same way on a developer's Mac.
|
|
7
|
+
|
|
8
|
+
init_config:
|
|
9
|
+
|
|
10
|
+
instances:
|
|
11
|
+
- {}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# system.io.* - per-device read/write rates, await, and utilization.
|
|
2
|
+
#
|
|
3
|
+
# Every value is a rate, so the first run of a fresh agent emits nothing: the check needs two
|
|
4
|
+
# samples. That silence is normal and lasts one interval.
|
|
5
|
+
#
|
|
6
|
+
# device_exclude_re is worth setting on a host with many LVM logical volumes or transient
|
|
7
|
+
# loopback devices. Left unset, as upstream leaves it.
|
|
8
|
+
|
|
9
|
+
init_config:
|
|
10
|
+
|
|
11
|
+
instances:
|
|
12
|
+
- {}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# system.mem.* and system.swap.*.
|
|
2
|
+
#
|
|
3
|
+
# collect_memory_pressure adds the /proc/vmstat allocstall and pgscan counters on Linux. Left
|
|
4
|
+
# off, as upstream leaves it: they are kernel-reclaim internals, and the pressure they describe
|
|
5
|
+
# shows up in system.mem.usable first.
|
|
6
|
+
|
|
7
|
+
init_config:
|
|
8
|
+
|
|
9
|
+
instances:
|
|
10
|
+
- {}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# system.net.* - per-interface bytes and packets, TCP/UDP counters.
|
|
2
|
+
#
|
|
3
|
+
# collect_connection_state shells out to enumerate sockets and is off by default upstream. It
|
|
4
|
+
# is the expensive option in this file; leave it off unless the connection-state breakdown is
|
|
5
|
+
# what you came for.
|
|
6
|
+
|
|
7
|
+
init_config:
|
|
8
|
+
|
|
9
|
+
instances:
|
|
10
|
+
- collect_connection_state: false
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# There is no macOS network check to configure. The v1 check builds for linux || aix and the v2
|
|
2
|
+
# check for linux || windows, so on darwin the catalog has no "network" entry at all and this
|
|
3
|
+
# config would surface as a Loading Error in `datadog-agent status` rather than as metrics.
|
|
4
|
+
linux win32
|
package/config.yaml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Replaces Harper's component defaults outright; there is no merge. `jsResource` makes resources.js the
|
|
2
|
+
# entry the application loader compiles, and `pluginModule` is what hands that same module a Scope.
|
|
3
|
+
|
|
4
|
+
rest: true
|
|
5
|
+
|
|
6
|
+
jsResource:
|
|
7
|
+
files: resources.js
|
|
8
|
+
|
|
9
|
+
# handleApplication(scope) is the only path that starts an agent, and Harper calls it only for a component
|
|
10
|
+
# the node's root harper-config.yaml names. A directory found by scanning componentsRoot has its module discarded.
|
|
11
|
+
pluginModule: resources.js
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deliciousmonster/datadog-agent-binary",
|
|
3
|
+
"version": "7.82.1-next.0",
|
|
4
|
+
"description": "Harper component that runs the Datadog trace-agent and core-agent alongside a node, with pre-built binaries installed per platform",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc",
|
|
8
|
+
"dev": "tsc --watch",
|
|
9
|
+
"start": "node dist/src/cli.js",
|
|
10
|
+
"typecheck": "tsc --noEmit",
|
|
11
|
+
"clean": "rm -rf dist/ build/ npm/",
|
|
12
|
+
"build-agent": "npm run build && node dist/src/cli.js build",
|
|
13
|
+
"// all-platform-packages": "unlike platform-package, this assumes binaries were already built out-of-band (build-release.yml's publish job calls create-platform-packages.js directly, not through either npm script)",
|
|
14
|
+
"all-platform-packages": "npm run build && node scripts/create-platform-packages.js --all",
|
|
15
|
+
"platform-package": "npm run build-agent && node scripts/create-platform-packages.js",
|
|
16
|
+
"// update-optional-deps": "npm run build stays: run through npm version's `version` lifecycle in build-release.yml's publish job, this is the only thing that compiles dist/ there, and create-platform-packages.js and verify-package.js both read it in the two steps that follow",
|
|
17
|
+
"update-optional-deps": "npm run build && node scripts/update-optional-deps.js",
|
|
18
|
+
"// verify-package": "requires dist/ already built - in build-release.yml's publish job, the version-bump step's `version` lifecycle supplies it (see // update-optional-deps)",
|
|
19
|
+
"verify-package": "node scripts/verify-package.js",
|
|
20
|
+
"lint": "prettier --write .",
|
|
21
|
+
"lint:check": "prettier --check .",
|
|
22
|
+
"prepare": "husky",
|
|
23
|
+
"version": "npm run update-optional-deps",
|
|
24
|
+
"// test": "--test-timeout, because node --test defaults to 0 and a supervision change that hangs then reads as a stuck machine rather than a failure; the slowest test in this tier is 1.4s, so 120s only ever fires on a hang",
|
|
25
|
+
"test": "npm run build && node --test --test-timeout=120000 \"test/component/**/*.test.js\" \"test/e2e/**/*.test.js\"",
|
|
26
|
+
"// test:windows": "the Windows leg's stand-in for `test`: same two directories, minus the suites scripts/windows-gate.mjs lists as unrunnable there, and it fails rather than exits 0 on a run that executed nothing",
|
|
27
|
+
"test:windows": "npm run build && node scripts/windows-gate.mjs",
|
|
28
|
+
"test:live": "npm run build && node --test \"test/live/**/*.test.js\"",
|
|
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\""
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"datadog",
|
|
34
|
+
"agent",
|
|
35
|
+
"build",
|
|
36
|
+
"cross-platform"
|
|
37
|
+
],
|
|
38
|
+
"author": "",
|
|
39
|
+
"license": "Apache-2.0",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@deliciousmonster/harper-process-guard": "0.1.0-next.1"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^26.0.0",
|
|
45
|
+
"commander": "^15.0.0",
|
|
46
|
+
"dd-trace": "^6.13.0",
|
|
47
|
+
"husky": "^9.1.7",
|
|
48
|
+
"lint-staged": "^17.4.1",
|
|
49
|
+
"prettier": "^3.9.6",
|
|
50
|
+
"typescript": "^7.0.2"
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"conf.d/",
|
|
54
|
+
"config.yaml",
|
|
55
|
+
"resources.js",
|
|
56
|
+
"runtime/",
|
|
57
|
+
"README.md"
|
|
58
|
+
],
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": "^22.18.0 || >=24.0.0"
|
|
61
|
+
},
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "git+https://github.com/deliciousmonster/datadog-agent-binary.git"
|
|
65
|
+
},
|
|
66
|
+
"bugs": {
|
|
67
|
+
"url": "https://github.com/deliciousmonster/datadog-agent-binary/issues"
|
|
68
|
+
},
|
|
69
|
+
"homepage": "https://github.com/deliciousmonster/datadog-agent-binary#readme",
|
|
70
|
+
"optionalDependencies": {
|
|
71
|
+
"@deliciousmonster/datadog-agent-binary-linux-x86_64": "7.82.1-next.0",
|
|
72
|
+
"@deliciousmonster/datadog-agent-binary-linux-arm64": "7.82.1-next.0",
|
|
73
|
+
"@deliciousmonster/datadog-agent-binary-macos-arm64": "7.82.1-next.0",
|
|
74
|
+
"@deliciousmonster/datadog-agent-binary-windows-x86_64": "7.82.1-next.0"
|
|
75
|
+
},
|
|
76
|
+
"lint-staged": {
|
|
77
|
+
"*.{ts,js,json}": [
|
|
78
|
+
"prettier --check"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|