@superblocksteam/sdk 2.0.0-next.4 → 2.0.0-next.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-tracer.d.ts","sourceRoot":"","sources":["../../src/dev-utils/dev-tracer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev-tracer.d.ts","sourceRoot":"","sources":["../../src/dev-utils/dev-tracer.ts"],"names":[],"mappings":"AAiDA,QAAA,MAAM,MAAM,qCAAyD,CAAC;AAEtE,eAAe,MAAM,CAAC"}
|
|
@@ -2,11 +2,18 @@ import { trace } from "@opentelemetry/api";
|
|
|
2
2
|
import { AsyncLocalStorageContextManager } from "@opentelemetry/context-async-hooks";
|
|
3
3
|
import { ExpressInstrumentation } from "@opentelemetry/instrumentation-express";
|
|
4
4
|
import { HttpInstrumentation } from "@opentelemetry/instrumentation-http";
|
|
5
|
+
import { Resource } from "@opentelemetry/resources";
|
|
5
6
|
import { NodeSDK } from "@opentelemetry/sdk-node";
|
|
7
|
+
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
|
|
6
8
|
import packageJson from "../../package.json" with { type: "json" };
|
|
9
|
+
// NOTE: @joeyagreco - this is how the "env" facet is determined in datadog: https://docs.datadoghq.com/opentelemetry/setup/collector_exporter/#3---configure-your-application
|
|
10
|
+
const ATTR_DEPLOYMENT_ENVIRONMENT = "deployment.environment";
|
|
7
11
|
// Initialize the OpenTelemetry SDK
|
|
8
12
|
const sdk = new NodeSDK({
|
|
9
|
-
|
|
13
|
+
resource: Resource.default().merge(new Resource({
|
|
14
|
+
[ATTR_SERVICE_NAME]: "sdk-dev-server",
|
|
15
|
+
[ATTR_DEPLOYMENT_ENVIRONMENT]: process.env.SUPERBLOCKS_CLI_ENV,
|
|
16
|
+
})),
|
|
10
17
|
contextManager: new AsyncLocalStorageContextManager(),
|
|
11
18
|
instrumentations: [
|
|
12
19
|
// Configure HTTP instrumentation with custom attributes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-tracer.js","sourceRoot":"","sources":["../../src/dev-utils/dev-tracer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,WAAW,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAGnE,mCAAmC;AACnC,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC;IACtB,
|
|
1
|
+
{"version":3,"file":"dev-tracer.js","sourceRoot":"","sources":["../../src/dev-utils/dev-tracer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,WAAW,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAGnE,8KAA8K;AAC9K,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AAE7D,mCAAmC;AACnC,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC;IACtB,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAChC,IAAI,QAAQ,CAAC;QACX,CAAC,iBAAiB,CAAC,EAAE,gBAAgB;QACrC,CAAC,2BAA2B,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;KAC/D,CAAC,CACH;IACD,cAAc,EAAE,IAAI,+BAA+B,EAAE;IACrD,gBAAgB,EAAE;QAChB,wDAAwD;QACxD,IAAI,mBAAmB,CAAC;YACtB,WAAW,EAAE,CAAC,IAAU,EAAE,OAAY,EAAE,EAAE;gBACxC,IAAI,QAAQ,GAAG,KAAK,CAAC;gBACrB,IAAI,OAAO,EAAE,CAAC;oBACZ,QAAQ,GAAG,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;gBAChE,CAAC;gBACD,IAAI,CAAC,aAAa,CAAC;oBACjB,eAAe,EAAE,QAAQ;iBAC1B,CAAC,CAAC;YACL,CAAC;SACF,CAAC;QACF,oCAAoC;QACpC,IAAI,sBAAsB,CAAC;YACzB,WAAW,EAAE,CAAC,IAAU,EAAE,OAAY,EAAE,EAAE;gBACxC,IAAI,CAAC,aAAa,CAAC;oBACjB,eAAe,EAAE,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE;iBACpD,CAAC,CAAC;YACL,CAAC;SACF,CAAC;KACH;CACF,CAAC,CAAC;AAEH,GAAG,CAAC,KAAK,EAAE,CAAC;AAEZ,wBAAwB;AACxB,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,gBAAgB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;AAEtE,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/sdk",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Superblocks JS SDK",
|
|
6
6
|
"homepage": "https://www.superblocks.com",
|
|
@@ -18,14 +18,16 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@opentelemetry/api": "^1.9.0",
|
|
20
20
|
"@opentelemetry/context-async-hooks": "^2.0.1",
|
|
21
|
+
"@opentelemetry/resources": "^1.28.0",
|
|
22
|
+
"@opentelemetry/semantic-conventions": "^1.28.0",
|
|
21
23
|
"@opentelemetry/instrumentation-express": "^0.45.0",
|
|
22
24
|
"@opentelemetry/instrumentation-http": "^0.55.0",
|
|
23
25
|
"@opentelemetry/sdk-node": "^0.55.0",
|
|
24
26
|
"@rollup/wasm-node": "^4.35.0",
|
|
25
27
|
"@superblocksteam/bucketeer-sdk": "0.4.1",
|
|
26
28
|
"@superblocksteam/shared": "0.9122.0",
|
|
27
|
-
"@superblocksteam/util": "2.0.0-next.
|
|
28
|
-
"@superblocksteam/vite-plugin-file-sync": "2.0.0-next.
|
|
29
|
+
"@superblocksteam/util": "2.0.0-next.6",
|
|
30
|
+
"@superblocksteam/vite-plugin-file-sync": "2.0.0-next.6",
|
|
29
31
|
"@vitejs/plugin-react": "^4.3.4",
|
|
30
32
|
"axios": "^1.4.0",
|
|
31
33
|
"chokidar": "^4.0.3",
|
|
@@ -2,13 +2,23 @@ import { trace } from "@opentelemetry/api";
|
|
|
2
2
|
import { AsyncLocalStorageContextManager } from "@opentelemetry/context-async-hooks";
|
|
3
3
|
import { ExpressInstrumentation } from "@opentelemetry/instrumentation-express";
|
|
4
4
|
import { HttpInstrumentation } from "@opentelemetry/instrumentation-http";
|
|
5
|
+
import { Resource } from "@opentelemetry/resources";
|
|
5
6
|
import { NodeSDK } from "@opentelemetry/sdk-node";
|
|
7
|
+
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
|
|
6
8
|
import packageJson from "../../package.json" with { type: "json" };
|
|
7
9
|
import type { Span } from "@opentelemetry/api";
|
|
8
10
|
|
|
11
|
+
// NOTE: @joeyagreco - this is how the "env" facet is determined in datadog: https://docs.datadoghq.com/opentelemetry/setup/collector_exporter/#3---configure-your-application
|
|
12
|
+
const ATTR_DEPLOYMENT_ENVIRONMENT = "deployment.environment";
|
|
13
|
+
|
|
9
14
|
// Initialize the OpenTelemetry SDK
|
|
10
15
|
const sdk = new NodeSDK({
|
|
11
|
-
|
|
16
|
+
resource: Resource.default().merge(
|
|
17
|
+
new Resource({
|
|
18
|
+
[ATTR_SERVICE_NAME]: "sdk-dev-server",
|
|
19
|
+
[ATTR_DEPLOYMENT_ENVIRONMENT]: process.env.SUPERBLOCKS_CLI_ENV,
|
|
20
|
+
}),
|
|
21
|
+
),
|
|
12
22
|
contextManager: new AsyncLocalStorageContextManager(),
|
|
13
23
|
instrumentations: [
|
|
14
24
|
// Configure HTTP instrumentation with custom attributes
|