@vercel/otel 0.0.1 → 0.0.2
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/dist/index.edge.d.ts +2 -0
- package/dist/index.edge.d.ts.map +1 -0
- package/dist/index.edge.js +9 -0
- package/dist/index.edge.js.map +1 -0
- package/dist/index.node.d.ts +4 -0
- package/dist/index.node.d.ts.map +1 -0
- package/dist/index.node.js +34 -0
- package/dist/index.node.js.map +1 -0
- package/package.json +4 -1
- package/.github/workflows/build.yml +0 -33
- package/src/index.edge.ts +0 -4
- package/src/index.node.ts +0 -24
- package/tsconfig.browser.json +0 -7
- package/tsconfig.edge.json +0 -7
- package/tsconfig.json +0 -22
- package/tsconfig.node.json +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.edge.d.ts","sourceRoot":"","sources":["../src/index.edge.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,gBAAiB,MAAM,SAG/C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerOTel = void 0;
|
|
4
|
+
const registerOTel = (serviceName) => {
|
|
5
|
+
void serviceName;
|
|
6
|
+
// We don't support OpenTelemetry on edge.
|
|
7
|
+
};
|
|
8
|
+
exports.registerOTel = registerOTel;
|
|
9
|
+
//# sourceMappingURL=index.edge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.edge.js","sourceRoot":"","sources":["../src/index.edge.ts"],"names":[],"mappings":";;;AAAO,MAAM,YAAY,GAAG,CAAC,WAAmB,EAAE,EAAE;IAClD,KAAK,WAAW,CAAC;IACjB,0CAA0C;AAC5C,CAAC,CAAC;AAHW,QAAA,YAAY,gBAGvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAInC,OAAO,EACL,kBAAkB,EAEnB,MAAM,+BAA+B,CAAC;AAIvC,eAAO,MAAM,YAAY,gBAAiB,MAAM,uBAY/C,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.registerOTel = void 0;
|
|
18
|
+
__exportStar(require("@opentelemetry/api"), exports);
|
|
19
|
+
const resources_1 = require("@opentelemetry/resources");
|
|
20
|
+
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
|
|
21
|
+
const sdk_trace_node_1 = require("@opentelemetry/sdk-trace-node");
|
|
22
|
+
const exporter_trace_otlp_http_1 = require("@opentelemetry/exporter-trace-otlp-http");
|
|
23
|
+
const registerOTel = (serviceName) => {
|
|
24
|
+
const provider = new sdk_trace_node_1.NodeTracerProvider({
|
|
25
|
+
resource: new resources_1.Resource({
|
|
26
|
+
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: serviceName,
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
provider.register();
|
|
30
|
+
provider.addSpanProcessor(new sdk_trace_node_1.SimpleSpanProcessor(new exporter_trace_otlp_http_1.OTLPTraceExporter({})));
|
|
31
|
+
return provider;
|
|
32
|
+
};
|
|
33
|
+
exports.registerOTel = registerOTel;
|
|
34
|
+
//# sourceMappingURL=index.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.node.js","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAmC;AAEnC,wDAAoD;AACpD,8EAAiF;AACjF,kEAGuC;AAEvC,sFAA4E;AAErE,MAAM,YAAY,GAAG,CAAC,WAAmB,EAAE,EAAE;IAClD,MAAM,QAAQ,GAAG,IAAI,mCAAkB,CAAC;QACtC,QAAQ,EAAE,IAAI,oBAAQ,CAAC;YACrB,CAAC,iDAA0B,CAAC,YAAY,CAAC,EAAE,WAAW;SACvD,CAAC;KACH,CAAC,CAAC;IAEH,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAEpB,QAAQ,CAAC,gBAAgB,CAAC,IAAI,oCAAmB,CAAC,IAAI,4CAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE9E,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAZW,QAAA,YAAY,gBAYvB"}
|
package/package.json
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
name: Tests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
tags:
|
|
8
|
-
- "!*"
|
|
9
|
-
pull_request:
|
|
10
|
-
|
|
11
|
-
env:
|
|
12
|
-
NODE_VERSION: "16"
|
|
13
|
-
TURBO_REMOTE_ONLY: "true"
|
|
14
|
-
TURBO_TEAM: "vercel"
|
|
15
|
-
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
16
|
-
|
|
17
|
-
concurrency:
|
|
18
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
19
|
-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
build:
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v3
|
|
26
|
-
with:
|
|
27
|
-
fetch-depth: 2
|
|
28
|
-
- uses: actions/setup-node@v3
|
|
29
|
-
with:
|
|
30
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
31
|
-
- run: npm i -g pnpm@7.24.2
|
|
32
|
-
- run: pnpm install
|
|
33
|
-
- run: pnpm build
|
package/src/index.edge.ts
DELETED
package/src/index.node.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export * from "@opentelemetry/api";
|
|
2
|
-
|
|
3
|
-
import { Resource } from "@opentelemetry/resources";
|
|
4
|
-
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
|
|
5
|
-
import {
|
|
6
|
-
NodeTracerProvider,
|
|
7
|
-
SimpleSpanProcessor,
|
|
8
|
-
} from "@opentelemetry/sdk-trace-node";
|
|
9
|
-
|
|
10
|
-
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
|
11
|
-
|
|
12
|
-
export const registerOTel = (serviceName: string) => {
|
|
13
|
-
const provider = new NodeTracerProvider({
|
|
14
|
-
resource: new Resource({
|
|
15
|
-
[SemanticResourceAttributes.SERVICE_NAME]: serviceName,
|
|
16
|
-
}),
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
provider.register();
|
|
20
|
-
|
|
21
|
-
provider.addSpanProcessor(new SimpleSpanProcessor(new OTLPTraceExporter({})));
|
|
22
|
-
|
|
23
|
-
return provider;
|
|
24
|
-
};
|
package/tsconfig.browser.json
DELETED
package/tsconfig.edge.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"declarationMap": true,
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"lib": ["ES2020"],
|
|
7
|
-
"module": "commonjs",
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"noEmitOnError": true,
|
|
10
|
-
"noFallthroughCasesInSwitch": true,
|
|
11
|
-
"noImplicitReturns": true,
|
|
12
|
-
"noUnusedLocals": true,
|
|
13
|
-
"noUnusedParameters": true,
|
|
14
|
-
"outDir": "./dist",
|
|
15
|
-
"types": ["node"],
|
|
16
|
-
"strict": true,
|
|
17
|
-
"sourceMap": true,
|
|
18
|
-
"target": "ES2020"
|
|
19
|
-
},
|
|
20
|
-
"include": ["src/**/*"],
|
|
21
|
-
"exclude": ["node_modules"]
|
|
22
|
-
}
|
package/tsconfig.node.json
DELETED