@budibase/worker 1.2.51 → 1.2.54

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.
Files changed (2) hide show
  1. package/package.json +7 -6
  2. package/src/index.ts +10 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "1.2.51",
4
+ "version": "1.2.54",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -35,10 +35,10 @@
35
35
  "author": "Budibase",
36
36
  "license": "GPL-3.0",
37
37
  "dependencies": {
38
- "@budibase/backend-core": "^1.2.51",
39
- "@budibase/pro": "1.2.50",
40
- "@budibase/string-templates": "^1.2.51",
41
- "@budibase/types": "^1.2.51",
38
+ "@budibase/backend-core": "^1.2.54",
39
+ "@budibase/pro": "1.2.53",
40
+ "@budibase/string-templates": "^1.2.54",
41
+ "@budibase/types": "^1.2.54",
42
42
  "@koa/router": "8.0.8",
43
43
  "@sentry/node": "6.17.7",
44
44
  "@techpass/passport-openidconnect": "0.3.2",
@@ -46,6 +46,7 @@
46
46
  "aws-sdk": "2.1030.0",
47
47
  "bcryptjs": "2.4.3",
48
48
  "dotenv": "8.6.0",
49
+ "elastic-apm-node": "3.38.0",
49
50
  "global-agent": "3.0.0",
50
51
  "got": "11.8.3",
51
52
  "joi": "17.6.0",
@@ -101,5 +102,5 @@
101
102
  "./scripts/jestSetup.js"
102
103
  ]
103
104
  },
104
- "gitHead": "910759bebb2b6430a3284f9d18ecb93ff2114eaf"
105
+ "gitHead": "af896d37aa6407f5a2f5f1478f7e61a72f20e3fe"
105
106
  }
package/src/index.ts CHANGED
@@ -1,10 +1,18 @@
1
1
  // need to load environment first
2
+ const env = require("./environment")
3
+
4
+ // enable APM if configured
5
+ if (process.env.ELASTIC_APM_ENABLED) {
6
+ const apm = require("elastic-apm-node").start({
7
+ serviceName: process.env.SERVICE,
8
+ environment: process.env.BUDIBASE_ENVIRONMENT,
9
+ })
10
+ }
11
+
2
12
  import { Scope } from "@sentry/node"
3
13
  import { Event } from "@sentry/types/dist/event"
4
14
  import Application from "koa"
5
15
  import { bootstrap } from "global-agent"
6
-
7
- const env = require("./environment")
8
16
  import db from "./db"
9
17
  db.init()
10
18
  const Koa = require("koa")