@pocket-tools/tracing 1.7.1 → 1.7.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/.turbo/turbo-build.log +7 -7
- package/.turbo/turbo-semantic-release.log +65 -65
- package/dist/index.d.mts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +5 -16
- package/dist/index.mjs +6 -17
- package/package.json +1 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[33mCJS[39m [33mYou have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin[39m
|
|
12
12
|
[33mESM[39m [33mYou have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin[39m
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m5.41 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 108ms
|
|
15
|
+
[32mCJS[39m [1mdist/index.js [22m[32m7.58 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 111ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 5465ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m549.00 B[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m549.00 B[39m
|
|
@@ -14,74 +14,74 @@
|
|
|
14
14
|
[34mESM[39m Build start
|
|
15
15
|
[33mCJS[39m [33mYou have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin[39m
|
|
16
16
|
[33mESM[39m [33mYou have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin[39m
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
17
|
+
[32mCJS[39m [1mdist/index.js [22m[32m7.58 KB[39m
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 151ms
|
|
19
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m5.41 KB[39m
|
|
20
|
+
[32mESM[39m ⚡️ Build success in 151ms
|
|
21
21
|
[34mDTS[39m Build start
|
|
22
|
-
[32mDTS[39m ⚡️ Build success in
|
|
23
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
24
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
22
|
+
[32mDTS[39m ⚡️ Build success in 8754ms
|
|
23
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m549.00 B[39m
|
|
24
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m549.00 B[39m
|
|
25
25
|
|
|
26
26
|
> @pocket-tools/tracing@0.0.0-development semantic-release /home/runner/work/pocket-monorepo/pocket-monorepo/packages/tracing
|
|
27
27
|
> semantic-release
|
|
28
28
|
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
29
|
+
[7:07:15 PM] [semantic-release] › ℹ Running semantic-release version 24.1.0
|
|
30
|
+
[7:07:17 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
|
|
31
|
+
[7:07:17 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
|
|
32
|
+
[7:07:17 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm"
|
|
33
|
+
[7:07:17 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm"
|
|
34
|
+
[7:07:17 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
|
|
35
|
+
[7:07:17 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
|
|
36
|
+
[7:07:17 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/github"
|
|
37
|
+
[7:07:21 PM] [semantic-release] › ✔ Run automated release from branch main on repository git+https://github.com/Pocket/pocket-monorepo.git
|
|
38
|
+
[7:07:21 PM] [semantic-release] › ✔ Allowed to push to the Git repository
|
|
39
|
+
[7:07:21 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/npm"
|
|
40
|
+
[7:07:21 PM] [semantic-release] [@semantic-release/npm] › ℹ Verify authentication for registry https://registry.npmjs.org/
|
|
41
|
+
[7:07:21 PM] [semantic-release] [@semantic-release/npm] › ℹ Wrote NPM_TOKEN to /tmp/0b5be35645d411274eeee5e8a95a3e59/.npmrc
|
|
42
42
|
pocket-npm
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
68
|
-
[
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
81
|
-
[
|
|
82
|
-
[
|
|
83
|
-
[
|
|
84
|
-
[
|
|
85
|
-
[
|
|
86
|
-
[
|
|
87
|
-
[
|
|
43
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/npm"
|
|
44
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
|
|
45
|
+
[7:07:23 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication (https://api.github.com)
|
|
46
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/github"
|
|
47
|
+
[7:07:23 PM] [semantic-release] › ℹ Found git tag @pocket-tools/tracing-v1.7.1 associated with version 1.7.1 on branch main
|
|
48
|
+
[7:07:23 PM] [semantic-release] › ℹ Found 2 commits since last release
|
|
49
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
50
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
|
|
51
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 1 commits for package @pocket-tools/tracing since last release
|
|
52
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: fix(otel): removing metrics and upping exporting (#805)
|
|
53
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The release type for the commit is patch
|
|
54
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analysis of 1 commits complete: patch release
|
|
55
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
|
|
56
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
57
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
58
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/release-notes-generator" does not provide step "analyzeCommits"
|
|
59
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
60
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
61
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/npm" does not provide step "analyzeCommits"
|
|
62
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
63
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
64
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/github" does not provide step "analyzeCommits"
|
|
65
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
66
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
67
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
68
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
69
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
70
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
71
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
72
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
73
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
74
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
75
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
76
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
77
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
78
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
79
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
80
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
81
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
82
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
83
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
84
|
+
[7:07:23 PM] [semantic-release] › ℹ The next release version is 1.7.2
|
|
85
|
+
[7:07:23 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
86
|
+
[7:07:23 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/commit-analyzer" does not provide step "generateNotes"
|
|
87
|
+
[7:07:23 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DiagLogger } from '@opentelemetry/api';
|
|
2
1
|
import { NodeClient } from '@sentry/node';
|
|
3
2
|
|
|
4
3
|
declare enum AdditionalInstrumentation {
|
|
@@ -12,7 +11,6 @@ type TracingConfig = {
|
|
|
12
11
|
graphQLDepth?: number;
|
|
13
12
|
url?: string;
|
|
14
13
|
protocol?: 'GRPC' | 'HTTP';
|
|
15
|
-
logger?: DiagLogger;
|
|
16
14
|
sentry: NodeClient | undefined;
|
|
17
15
|
additionalInstrumentations?: AdditionalInstrumentation[];
|
|
18
16
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DiagLogger } from '@opentelemetry/api';
|
|
2
1
|
import { NodeClient } from '@sentry/node';
|
|
3
2
|
|
|
4
3
|
declare enum AdditionalInstrumentation {
|
|
@@ -12,7 +11,6 @@ type TracingConfig = {
|
|
|
12
11
|
graphQLDepth?: number;
|
|
13
12
|
url?: string;
|
|
14
13
|
protocol?: 'GRPC' | 'HTTP';
|
|
15
|
-
logger?: DiagLogger;
|
|
16
14
|
sentry: NodeClient | undefined;
|
|
17
15
|
additionalInstrumentations?: AdditionalInstrumentation[];
|
|
18
16
|
};
|
package/dist/index.js
CHANGED
|
@@ -47,14 +47,10 @@ var import_instrumentation = require("@prisma/instrumentation");
|
|
|
47
47
|
var import_resources = require("@opentelemetry/resources");
|
|
48
48
|
var import_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
49
49
|
var import_opentelemetry = require("@sentry/opentelemetry");
|
|
50
|
-
var import_sdk_metrics = require("@opentelemetry/sdk-metrics");
|
|
51
|
-
var import_exporter_metrics_otlp_http = require("@opentelemetry/exporter-metrics-otlp-http");
|
|
52
|
-
var import_exporter_metrics_otlp_grpc = require("@opentelemetry/exporter-metrics-otlp-grpc");
|
|
53
50
|
var import_auto_instrumentations_node = require("@opentelemetry/auto-instrumentations-node");
|
|
54
51
|
var import_resources2 = require("@opentelemetry/resources");
|
|
55
52
|
var import_resource_detector_aws = require("@opentelemetry/resource-detector-aws");
|
|
56
53
|
var Sentry = __toESM(require("@sentry/node"));
|
|
57
|
-
var import_ts_logger = require("@pocket-tools/ts-logger");
|
|
58
54
|
var import_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
|
|
59
55
|
var import_propagator_aws_xray = require("@opentelemetry/propagator-aws-xray");
|
|
60
56
|
var import_id_generator_aws_xray = require("@opentelemetry/id-generator-aws-xray");
|
|
@@ -93,12 +89,13 @@ function awaitAttributes(detector) {
|
|
|
93
89
|
var batchConfig = {
|
|
94
90
|
maxQueueSize: 4096,
|
|
95
91
|
maxExportBatchSize: 1e3,
|
|
96
|
-
scheduledDelayMillis:
|
|
92
|
+
scheduledDelayMillis: 500,
|
|
97
93
|
exportTimeoutMillis: 5e3
|
|
98
94
|
};
|
|
99
95
|
async function nodeSDKBuilder(config) {
|
|
100
|
-
var _a
|
|
96
|
+
var _a;
|
|
101
97
|
config = { ...tracingDefaults, ...config };
|
|
98
|
+
import_api.diag.setLogger(new import_api.DiagConsoleLogger(), import_api.DiagLogLevel.WARN);
|
|
102
99
|
const _resource = import_resources.Resource.default().merge(
|
|
103
100
|
new import_resources.Resource({
|
|
104
101
|
[import_semantic_conventions.ATTR_SERVICE_NAME]: config.serviceName,
|
|
@@ -109,14 +106,6 @@ async function nodeSDKBuilder(config) {
|
|
|
109
106
|
//collector url
|
|
110
107
|
url: `${config.url}/v1/traces`
|
|
111
108
|
}) : new import_exporter_trace_otlp_grpc.OTLPTraceExporter({ url: config.url });
|
|
112
|
-
const _metricReader = new import_sdk_metrics.PeriodicExportingMetricReader({
|
|
113
|
-
exporter: config.protocol === "HTTP" ? new import_exporter_metrics_otlp_http.OTLPMetricExporter({
|
|
114
|
-
url: `${config.url}/v1/metrics`
|
|
115
|
-
}) : new import_exporter_metrics_otlp_grpc.OTLPMetricExporter({ url: config.url }),
|
|
116
|
-
// once every 60 seconds, GCP supports 1 every 5 seconds for custom metrics https://cloud.google.com/monitoring/quotas#custom_metrics_quotas
|
|
117
|
-
// But lets just do 60 seconds for now as we figure it out
|
|
118
|
-
exportIntervalMillis: 6e4
|
|
119
|
-
});
|
|
120
109
|
const _logExporter = config.protocol === "HTTP" ? new import_exporter_logs_otlp_http.OTLPLogExporter({ url: `${config.url}/v1/logs` }) : new import_exporter_logs_otlp_grpc.OTLPLogExporter({ url: config.url });
|
|
121
110
|
const instrumentations = [
|
|
122
111
|
(0, import_auto_instrumentations_node.getNodeAutoInstrumentations)({
|
|
@@ -157,7 +146,8 @@ async function nodeSDKBuilder(config) {
|
|
|
157
146
|
resource: _resource,
|
|
158
147
|
idGenerator: new import_id_generator_aws_xray.AWSXRayIdGenerator(),
|
|
159
148
|
spanProcessors: [new import_sdk_trace_base.BatchSpanProcessor(_traceExporter, batchConfig)],
|
|
160
|
-
|
|
149
|
+
// Disabling metrics until traces feel in the right space.
|
|
150
|
+
// metricReader: _metricReader,
|
|
161
151
|
logRecordProcessors: [
|
|
162
152
|
new import_sdk_node.logs.BatchLogRecordProcessor(_logExporter, batchConfig)
|
|
163
153
|
],
|
|
@@ -171,7 +161,6 @@ async function nodeSDKBuilder(config) {
|
|
|
171
161
|
]
|
|
172
162
|
});
|
|
173
163
|
sdk.start();
|
|
174
|
-
import_api.diag.setLogger((_b = config.logger) != null ? _b : import_ts_logger.serverLogger, import_api.DiagLogLevel.WARN);
|
|
175
164
|
import_api.diag.info("Tracer successfully started");
|
|
176
165
|
Sentry.validateOpenTelemetrySetup();
|
|
177
166
|
import_process.default.on("SIGTERM", () => {
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/tracing.ts
|
|
2
2
|
import process from "process";
|
|
3
3
|
import { NodeSDK, logs } from "@opentelemetry/sdk-node";
|
|
4
|
-
import { DiagLogLevel, diag } from "@opentelemetry/api";
|
|
4
|
+
import { DiagConsoleLogger, DiagLogLevel, diag } from "@opentelemetry/api";
|
|
5
5
|
import { KnexInstrumentation } from "@opentelemetry/instrumentation-knex";
|
|
6
6
|
import { OTLPTraceExporter as HTTPOTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
|
7
7
|
import { OTLPTraceExporter as GRPCOTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-grpc";
|
|
@@ -14,9 +14,6 @@ import {
|
|
|
14
14
|
ATTR_SERVICE_VERSION
|
|
15
15
|
} from "@opentelemetry/semantic-conventions";
|
|
16
16
|
import { SentrySampler } from "@sentry/opentelemetry";
|
|
17
|
-
import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
|
|
18
|
-
import { OTLPMetricExporter as HTTPOTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http";
|
|
19
|
-
import { OTLPMetricExporter as GRPCOTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-grpc";
|
|
20
17
|
import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";
|
|
21
18
|
import {
|
|
22
19
|
envDetectorSync,
|
|
@@ -25,7 +22,6 @@ import {
|
|
|
25
22
|
} from "@opentelemetry/resources";
|
|
26
23
|
import { awsEcsDetectorSync } from "@opentelemetry/resource-detector-aws";
|
|
27
24
|
import * as Sentry from "@sentry/node";
|
|
28
|
-
import { serverLogger } from "@pocket-tools/ts-logger";
|
|
29
25
|
import {
|
|
30
26
|
BatchSpanProcessor,
|
|
31
27
|
ParentBasedSampler
|
|
@@ -67,12 +63,13 @@ function awaitAttributes(detector) {
|
|
|
67
63
|
var batchConfig = {
|
|
68
64
|
maxQueueSize: 4096,
|
|
69
65
|
maxExportBatchSize: 1e3,
|
|
70
|
-
scheduledDelayMillis:
|
|
66
|
+
scheduledDelayMillis: 500,
|
|
71
67
|
exportTimeoutMillis: 5e3
|
|
72
68
|
};
|
|
73
69
|
async function nodeSDKBuilder(config) {
|
|
74
|
-
var _a
|
|
70
|
+
var _a;
|
|
75
71
|
config = { ...tracingDefaults, ...config };
|
|
72
|
+
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.WARN);
|
|
76
73
|
const _resource = Resource.default().merge(
|
|
77
74
|
new Resource({
|
|
78
75
|
[ATTR_SERVICE_NAME]: config.serviceName,
|
|
@@ -83,14 +80,6 @@ async function nodeSDKBuilder(config) {
|
|
|
83
80
|
//collector url
|
|
84
81
|
url: `${config.url}/v1/traces`
|
|
85
82
|
}) : new GRPCOTLPTraceExporter({ url: config.url });
|
|
86
|
-
const _metricReader = new PeriodicExportingMetricReader({
|
|
87
|
-
exporter: config.protocol === "HTTP" ? new HTTPOTLPMetricExporter({
|
|
88
|
-
url: `${config.url}/v1/metrics`
|
|
89
|
-
}) : new GRPCOTLPMetricExporter({ url: config.url }),
|
|
90
|
-
// once every 60 seconds, GCP supports 1 every 5 seconds for custom metrics https://cloud.google.com/monitoring/quotas#custom_metrics_quotas
|
|
91
|
-
// But lets just do 60 seconds for now as we figure it out
|
|
92
|
-
exportIntervalMillis: 6e4
|
|
93
|
-
});
|
|
94
83
|
const _logExporter = config.protocol === "HTTP" ? new HTTPOTLPLogExporter({ url: `${config.url}/v1/logs` }) : new GRPCOTLPLogExporter({ url: config.url });
|
|
95
84
|
const instrumentations = [
|
|
96
85
|
getNodeAutoInstrumentations({
|
|
@@ -131,7 +120,8 @@ async function nodeSDKBuilder(config) {
|
|
|
131
120
|
resource: _resource,
|
|
132
121
|
idGenerator: new AWSXRayIdGenerator(),
|
|
133
122
|
spanProcessors: [new BatchSpanProcessor(_traceExporter, batchConfig)],
|
|
134
|
-
|
|
123
|
+
// Disabling metrics until traces feel in the right space.
|
|
124
|
+
// metricReader: _metricReader,
|
|
135
125
|
logRecordProcessors: [
|
|
136
126
|
new logs.BatchLogRecordProcessor(_logExporter, batchConfig)
|
|
137
127
|
],
|
|
@@ -145,7 +135,6 @@ async function nodeSDKBuilder(config) {
|
|
|
145
135
|
]
|
|
146
136
|
});
|
|
147
137
|
sdk.start();
|
|
148
|
-
diag.setLogger((_b = config.logger) != null ? _b : serverLogger, DiagLogLevel.WARN);
|
|
149
138
|
diag.info("Tracer successfully started");
|
|
150
139
|
Sentry.validateOpenTelemetrySetup();
|
|
151
140
|
process.on("SIGTERM", () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pocket-tools/tracing",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "Utilities for tracing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tracing"
|
|
@@ -86,7 +86,6 @@
|
|
|
86
86
|
"@opentelemetry/sdk-trace-node": "1.26.0",
|
|
87
87
|
"@opentelemetry/semantic-conventions": "1.27.0",
|
|
88
88
|
"@opentelemetry/winston-transport": "0.6.0",
|
|
89
|
-
"@pocket-tools/ts-logger": "workspace:*",
|
|
90
89
|
"@prisma/instrumentation": "5.19.1",
|
|
91
90
|
"@sentry/node": "8.33.0",
|
|
92
91
|
"@sentry/opentelemetry": "8.33.0",
|