@jaypie/express 1.2.23 → 1.2.24
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 +4 -13
- package/dist/cjs/index.cjs +4 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { force, envBoolean, JAYPIE, HTTP, getHeaderFrom, jaypieHandler } from '@
|
|
|
5
5
|
import expressCors from 'cors';
|
|
6
6
|
import { loadEnvSecrets, getContentTypeForFormat, formatStreamError } from '@jaypie/aws';
|
|
7
7
|
import { log, redactAuth } from '@jaypie/logger';
|
|
8
|
-
import { hasDatadogEnv, submitMetric, DATADOG } from '@jaypie/datadog';
|
|
8
|
+
import { hasDatadogEnv, submitMetric, DATADOG, loadDatadogApiKey } from '@jaypie/datadog';
|
|
9
9
|
|
|
10
10
|
//
|
|
11
11
|
//
|
|
@@ -1863,6 +1863,10 @@ function expressHandler(handlerOrOptions, optionsOrHandler) {
|
|
|
1863
1863
|
//
|
|
1864
1864
|
// Build a request-local setup list to avoid mutating the shared array
|
|
1865
1865
|
const requestSetup = [];
|
|
1866
|
+
// Load the Datadog LLM Observability API key into the environment when enabled
|
|
1867
|
+
requestSetup.push(async () => {
|
|
1868
|
+
await loadDatadogApiKey();
|
|
1869
|
+
});
|
|
1866
1870
|
// Load secrets into process.env if configured
|
|
1867
1871
|
if (secrets && secrets.length > 0) {
|
|
1868
1872
|
const secretsToLoad = secrets;
|