@dbos-inc/dbos-sdk 0.8.37-preview → 0.8.39-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/cloud-cli/applications/deploy-app-code.d.ts +1 -1
- package/dist/src/cloud-cli/applications/deploy-app-code.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/deploy-app-code.js +12 -6
- package/dist/src/cloud-cli/applications/deploy-app-code.js.map +1 -1
- package/dist/src/cloud-cli/cli.js +3 -2
- package/dist/src/cloud-cli/cli.js.map +1 -1
- package/dist/src/httpServer/server.d.ts +5 -0
- package/dist/src/httpServer/server.d.ts.map +1 -1
- package/dist/src/httpServer/server.js +20 -1
- package/dist/src/httpServer/server.js.map +1 -1
- package/dist/src/telemetry/logs.js +2 -2
- package/dist/src/telemetry/logs.js.map +1 -1
- package/dist/src/telemetry/traces.js +2 -2
- package/dist/src/telemetry/traces.js.map +1 -1
- package/package.json +1 -1
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function deployAppCode(host: string): Promise<number>;
|
1
|
+
export declare function deployAppCode(host: string, docker: boolean): Promise<number>;
|
2
2
|
//# sourceMappingURL=deploy-app-code.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":"AAgBA,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,
|
1
|
+
{"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":"AAgBA,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CA2FlF"}
|
@@ -12,7 +12,7 @@ const utils_1 = require("../utils");
|
|
12
12
|
const utils_2 = require("../../utils");
|
13
13
|
const path_1 = __importDefault(require("path"));
|
14
14
|
const deployDirectoryName = "dbos_deploy";
|
15
|
-
async function deployAppCode(host) {
|
15
|
+
async function deployAppCode(host, docker) {
|
16
16
|
const logger = new logs_1.GlobalLogger();
|
17
17
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
18
18
|
const bearerToken = "Bearer " + userCredentials.token;
|
@@ -26,11 +26,17 @@ async function deployAppCode(host) {
|
|
26
26
|
logger.error("package-lock.json not found. Please run 'npm install' before deploying.");
|
27
27
|
return 1;
|
28
28
|
}
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
if (docker) {
|
30
|
+
// Build the application inside a Docker container using the same base image as our cloud setup
|
31
|
+
logger.info(`Building ${appName} using Docker`);
|
32
|
+
const dockerSuccess = await buildAppInDocker(appName);
|
33
|
+
if (!dockerSuccess) {
|
34
|
+
return 1;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
else {
|
38
|
+
// Zip the current directory and deploy from there. Requires app to have already been built. Only for testing.
|
39
|
+
(0, child_process_1.execSync)(`zip -ry ${deployDirectoryName}/${appName}.zip ./* -x ${deployDirectoryName}/* > /dev/null`);
|
34
40
|
}
|
35
41
|
try {
|
36
42
|
const zipData = (0, utils_2.readFileSync)(`${deployDirectoryName}/${appName}.zip`, "base64");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,iDAAyC;AACzC,2BAA+C;AAC/C,+CAAoD;AACpD,oCAA2D;AAC3D,uCAAmE;AACnE,gDAAwB;AAGxB,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAOnC,KAAK,UAAU,aAAa,CAAC,IAAY;
|
1
|
+
{"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,iDAAyC;AACzC,2BAA+C;AAC/C,+CAAoD;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gB,OAAO,EAAE,CAAC;IAEhD,qBAAqB;IACrB,MAAM,iBAAiB,GAAG;;;;;;;;;cASd,OAAO,gBAAgB,OAAO,aAAa,mBAAmB;CAC3E,CAAC;IACA,MAAM,mBAAmB,GAAG;;EAE5B,mBAAmB;;CAEpB,CAAC;IACA,IAAI,CAAC;QACH,yCAAyC;QACzC,IAAA,kBAAa,EAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;QACjD,IAAA,kBAAa,EAAC,GAAG,mBAAmB,+BAA+B,EAAE,mBAAmB,CAAC,CAAC;QAC1F,sGAAsG;QACtG,MAAM,IAAA,kBAAU,EAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,CAAC,CAAC,CAAA;QAC/E,oBAAoB;QACpB,IAAA,wBAAQ,EAAC,wBAAwB,aAAa,IAAI,OAAO,EAAE,CAAC,CAAC;QAC7D,oEAAoE;QACpE,IAAA,wBAAQ,EAAC,aAAa,aAAa,SAAS,OAAO,QAAQ,mBAAmB,IAAI,OAAO,MAAM,CAAC,CAAC;QACjG,gCAAgC;QAChC,IAAA,wBAAQ,EAAC,eAAe,aAAa,EAAE,CAAC,CAAC;QACzC,IAAA,wBAAQ,EAAC,aAAa,aAAa,EAAE,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,CAAC,KAAK,CAAC,+BAA+B,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAChF,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
@@ -68,9 +68,10 @@ applicationCommands
|
|
68
68
|
applicationCommands
|
69
69
|
.command('deploy')
|
70
70
|
.description('Deploy an application code to the cloud')
|
71
|
-
.
|
71
|
+
.option('--no-docker', 'Build the code locally without using Docker')
|
72
|
+
.action(async (options) => {
|
72
73
|
const { host } = applicationCommands.opts();
|
73
|
-
const exitCode = await (0, applications_1.deployAppCode)(host);
|
74
|
+
const exitCode = await (0, applications_1.deployAppCode)(host, options.docker);
|
74
75
|
process.exit(exitCode);
|
75
76
|
});
|
76
77
|
applicationCommands
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/cloud-cli/cli.ts"],"names":[],"mappings":";;;AAEA,kDAOyB;AACzB,yCAAoC;AACpC,mCAAgC;AAChC,yCAA0C;AAC1C,qCAA6F;AAC7F,mCAA2C;AAE3C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,2EAA2E;AAEzH,8DAA8D;AAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAwB,CAAC;AAC5E,OAAO;IACL,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAE/B,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AAErB,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,sBAAsB,CAAC;KACnC,cAAc,CAAC,yBAAyB,EAAE,UAAU,CAAC;KACrD,MAAM,CAAC,KAAK,EAAE,OAA6B,EAAE,EAAE;IAC9C,MAAM,QAAQ,GAAG,MAAM,IAAA,aAAK,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,UAAU,CAAC;KACnB,WAAW,CAAC,0CAA0C,CAAC;KACvD,cAAc,CAAC,yBAAyB,EAAE,UAAU,CAAC;KACrD,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,YAAY,CAAC;KAC/D,MAAM,CAAC,KAAK,EAAE,OAA0C,EAAE,EAAE;IAC3D,IAAI,CAAC,IAAA,wBAAgB,GAAE,EAAE,CAAC;Q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AC,CAAC,CAAC,CAAA;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,oDAAoD;AACpD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
@@ -8,6 +8,7 @@ import { DBOSExecutor } from "../dbos-executor";
|
|
8
8
|
import { GlobalLogger as Logger } from "../telemetry/logs";
|
9
9
|
export declare const WorkflowUUIDHeader = "dbos-workflowuuid";
|
10
10
|
export declare const WorkflowRecoveryUrl = "/dbos-workflow-recovery";
|
11
|
+
export declare const HealthUrl = "/dbos-healthz";
|
11
12
|
export declare class DBOSHttpServer {
|
12
13
|
readonly dbosExec: DBOSExecutor;
|
13
14
|
readonly app: Koa;
|
@@ -27,6 +28,10 @@ export declare class DBOSHttpServer {
|
|
27
28
|
* @param port
|
28
29
|
*/
|
29
30
|
listen(port: number): import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
|
31
|
+
/**
|
32
|
+
* Health check endpoint.
|
33
|
+
*/
|
34
|
+
static registerHealthEndpoint(dbosExec: DBOSExecutor, router: Router): void;
|
30
35
|
/**
|
31
36
|
* Register workflow recovery endpoint.
|
32
37
|
* Receives a list of executor IDs and returns a list of workflowUUIDs.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/httpServer/server.ts"],"names":[],"mappings":";;;;AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,MAAM,MAAM,aAAa,CAAC;AAkBjC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAK3D,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,mBAAmB,4BAA4B,CAAA;
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/httpServer/server.ts"],"names":[],"mappings":";;;;AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,MAAM,MAAM,aAAa,CAAC;AAkBjC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAK3D,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,mBAAmB,4BAA4B,CAAA;AAC5D,eAAO,MAAM,SAAS,kBAAkB,CAAA;AAExC,qBAAa,cAAc;IAUb,QAAQ,CAAC,QAAQ,EAAE,YAAY;IAT3C,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAClB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;;OAIG;gBACkB,QAAQ,EAAE,YAAY,EAAE,MAAM,GAAE;QAAE,GAAG,CAAC,EAAE,GAAG,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAO;IAwBxF;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM;IAOnB;;OAEG;IACD,MAAM,CAAC,sBAAsB,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAWtE;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAmBtE;;OAEG;IACH,MAAM,CAAC,0BAA0B,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;CA8KzE"}
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.DBOSHttpServer = exports.WorkflowRecoveryUrl = exports.WorkflowUUIDHeader = void 0;
|
6
|
+
exports.DBOSHttpServer = exports.HealthUrl = exports.WorkflowRecoveryUrl = exports.WorkflowUUIDHeader = void 0;
|
7
7
|
const koa_1 = __importDefault(require("koa"));
|
8
8
|
const router_1 = __importDefault(require("@koa/router"));
|
9
9
|
const bodyparser_1 = require("@koa/bodyparser");
|
@@ -13,6 +13,7 @@ const error_1 = require("../error");
|
|
13
13
|
const api_1 = require("@opentelemetry/api");
|
14
14
|
exports.WorkflowUUIDHeader = "dbos-workflowuuid";
|
15
15
|
exports.WorkflowRecoveryUrl = "/dbos-workflow-recovery";
|
16
|
+
exports.HealthUrl = "/dbos-healthz";
|
16
17
|
class DBOSHttpServer {
|
17
18
|
dbosExec;
|
18
19
|
app;
|
@@ -39,6 +40,7 @@ class DBOSHttpServer {
|
|
39
40
|
}
|
40
41
|
this.app = config.koa;
|
41
42
|
// Register HTTP endpoints.
|
43
|
+
DBOSHttpServer.registerHealthEndpoint(this.dbosExec, this.router);
|
42
44
|
DBOSHttpServer.registerRecoveryEndpoint(this.dbosExec, this.router);
|
43
45
|
DBOSHttpServer.registerDecoratedEndpoints(this.dbosExec, this.router);
|
44
46
|
this.app.use(this.router.routes()).use(this.router.allowedMethods());
|
@@ -53,6 +55,18 @@ class DBOSHttpServer {
|
|
53
55
|
this.logger.info(`DBOS Server is running at http://localhost:${port}`);
|
54
56
|
});
|
55
57
|
}
|
58
|
+
/**
|
59
|
+
* Health check endpoint.
|
60
|
+
*/
|
61
|
+
static registerHealthEndpoint(dbosExec, router) {
|
62
|
+
// Handler function that parses request for recovery.
|
63
|
+
const healthHandler = async (koaCtxt, koaNext) => {
|
64
|
+
koaCtxt.body = "healthy";
|
65
|
+
await koaNext();
|
66
|
+
};
|
67
|
+
router.get(exports.HealthUrl, healthHandler);
|
68
|
+
dbosExec.logger.debug(`DBOS Server Registered Healthz POST ${exports.HealthUrl}`);
|
69
|
+
}
|
56
70
|
/**
|
57
71
|
* Register workflow recovery endpoint.
|
58
72
|
* Receives a list of executor IDs and returns a list of workflowUUIDs.
|
@@ -84,6 +98,11 @@ class DBOSHttpServer {
|
|
84
98
|
dbosExec.logger.error(`Invalid URL: ${ro.apiURL} -- should not start with ${exports.WorkflowRecoveryUrl}!`);
|
85
99
|
return;
|
86
100
|
}
|
101
|
+
// Ignore URL with "/dbos-healthz" prefix.
|
102
|
+
if (ro.apiURL.startsWith(exports.HealthUrl)) {
|
103
|
+
dbosExec.logger.error(`Invalid URL: ${ro.apiURL} -- should not start with ${exports.HealthUrl}!`);
|
104
|
+
return;
|
105
|
+
}
|
87
106
|
// Check if we need to apply any Koa middleware.
|
88
107
|
const defaults = ro.defaults;
|
89
108
|
if (defaults?.koaMiddlewares) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/httpServer/server.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,yDAAiC;AACjC,gDAA6C;AAC7C,qDAA6B;AAC7B,uCAMmB;AAGnB,oCAKkB;AAIlB,4CAAyE;AAG5D,QAAA,kBAAkB,GAAG,mBAAmB,CAAC;AACzC,QAAA,mBAAmB,GAAG,yBAAyB,CAAA;
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/httpServer/server.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,yDAAiC;AACjC,gDAA6C;AAC7C,qDAA6B;AAC7B,uCAMmB;AAGnB,oCAKkB;AAIlB,4CAAyE;AAG5D,QAAA,kBAAkB,GAAG,mBAAmB,CAAC;AACzC,QAAA,mBAAmB,GAAG,yBAAyB,CAAA;AAC/C,QAAA,SAAS,GAAG,eAAe,CAAA;AAExC,MAAa,cAAc;IAUJ;IATZ,GAAG,CAAM;IACT,MAAM,CAAS;IACf,MAAM,CAAS;IAExB;;;;OAIG;IACH,YAAqB,QAAsB,EAAE,SAAyC,EAAE;QAAnE,aAAQ,GAAR,QAAQ,CAAc;QACzC,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AC,MAAM,CACjC,WAAK,CAAC,cAAc,CAAC,kBAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EACzD;4BACE,OAAO,EAAE,OAAO;yBACjB,EACD;4BACE,GAAG,EAAE,CAAC,OAAgB,EAAE,GAAW,EAAE,KAAa,EAAE,EAAE;gCACpD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;4BAClC,CAAC;yBACF,CACF,CAAC;wBACF,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;wBACjC,qCAAqC;wBACrC,OAAO,CAAC,GAAG,CAAC,yBAAe,EAAE,EAAE,CAAC,OAAO,CAAC,SAAmB,CAAC,CAAC;wBAC7D,MAAM,OAAO,EAAE,CAAC;oBAClB,CAAC;gBACH,CAAC,CAAC;gBAEF,kCAAkC;gBAClC,IAAI,EAAE,CAAC,OAAO,KAAK,kBAAQ,CAAC,GAAG,EAAE,CAAC;oBAChC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;oBACtC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;gBACnE,CAAC;qBAAM,IAAI,EAAE,CAAC,OAAO,KAAK,kBAAQ,CAAC,IAAI,EAAE,CAAC;oBACxC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;oBACvC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;gBACpE,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAnQD,wCAmQC"}
|
@@ -149,8 +149,8 @@ class OTLPLogQueueTransport extends TransportStream {
|
|
149
149
|
// not sure if we need a more explicit name here
|
150
150
|
const loggerProvider = new sdk_logs_1.LoggerProvider();
|
151
151
|
this.otelLogger = loggerProvider.getLogger("default");
|
152
|
-
this.applicationID = process.env.APPID || "APP_ID_NOT_DEFINED";
|
153
|
-
this.executorID = process.env.VMID || "VM_ID_NOT_DEFINED";
|
152
|
+
this.applicationID = process.env.DBOS__APPID || process.env.APPID || "APP_ID_NOT_DEFINED"; // TODO: Remove APPID
|
153
|
+
this.executorID = process.env.DBOS__VMID || process.env.VMID || "VM_ID_NOT_DEFINED"; // TODO: Remove VMID
|
154
154
|
const logRecordProcessor = {
|
155
155
|
forceFlush: async () => {
|
156
156
|
// no-op
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../../src/telemetry/logs.ts"],"names":[],"mappings":";;;AAAA,qCAAqF;AACrF,qDAAsD;AACtD,2EAA2E;AAE3E,sDAA8F;AAC9F,sDAAoE;AA8BpE,MAAa,YAAY;IAKJ;IAJF,MAAM,CAAiB;IAC/B,kBAAkB,CAAU;IAErC,YACmB,kBAAuC,EACxD,MAAqB;QADJ,uBAAkB,GAAlB,kBAAkB,CAAqB;QAGxD,MAAM,iBAAiB,GAAsB,EAAE,CAAC;QAChD,iBAAiB,CAAC,IAAI,CACpB,IAAI,oBAAU,CAAC,OAAO,CAAC;YACrB,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,MAAM,EAAE,QAAQ,IAAI,MAAM;YACjC,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK;SAChC,CAAC,CACH,CAAC;QACF,kFAAkF;QAClF,IAAI,IAAI,CAAC,kBAAkB,EAAE,QAAQ,EAAE,CAAC;YACtC,iBAAiB,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC7E,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,IAAA,sBAAY,EAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAC9D,IAAI,CAAC,kBAAkB,GAAG,MA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EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAmB;YACvM,kJAAkJ;YAClJ,6CAA6C;SAC9C,CAAC,CAAC;QAEH,QAAQ,EAAE,CAAC;IACb,CAAC;CACF"}
|
@@ -21,8 +21,8 @@ class Tracer {
|
|
21
21
|
}),
|
22
22
|
});
|
23
23
|
this.tracer.register();
|
24
|
-
this.applicationID = process.env.APPID || "APP_ID_NOT_DEFINED";
|
25
|
-
this.executorID = process.env.VMID || "VM_ID_NOT_DEFINED";
|
24
|
+
this.applicationID = process.env.DBOS__APPID || process.env.APPID || "APP_ID_NOT_DEFINED"; // TODO: Remove APPID
|
25
|
+
this.executorID = process.env.DBOS__VMID || process.env.VMID || "VM_ID_NOT_DEFINED"; // TODO: Remove VMID
|
26
26
|
}
|
27
27
|
startSpanWithContext(spanContext, name, attributes) {
|
28
28
|
const tracer = api_1.default.trace.getTracer("dbos-tracer");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"traces.js","sourceRoot":"","sources":["../../../src/telemetry/traces.ts"],"names":[],"mappings":";;;;;;AAAA,kEAAwF;AACxF,wDAAoD;AACpD,6DAA4E;AAC5E,8EAAiF;AAGjF,MAAa,MAAM;IAIY;IAHZ,MAAM,CAAsB;IACpC,aAAa,CAAS;IACtB,UAAU,CAAS;IAC5B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;QACjE,IAAI,CAAC,MAAM,GAAG,IAAI,oCAAmB,CAAC;YACpC,QAAQ,EAAE,IAAI,oBAAQ,CAAC;gBACrB,CAAC,iDAA0B,CAAC,YAAY,CAAC,EAAE,MAAM;aAClD,CAAC;SACH,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,oBAAoB,CAAC;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