@pocket-tools/tracing 1.8.0 → 1.8.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.
@@ -10,11 +10,11 @@
10
10
  ESM Build start
11
11
  CJS You have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin
12
12
  ESM You have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin
13
- CJS dist/index.js 11.93 KB
14
- CJS ⚡️ Build success in 129ms
15
- ESM dist/index.mjs 9.74 KB
16
- ESM ⚡️ Build success in 130ms
13
+ CJS dist/index.js 12.68 KB
14
+ CJS ⚡️ Build success in 132ms
15
+ ESM dist/index.mjs 10.45 KB
16
+ ESM ⚡️ Build success in 148ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 8198ms
18
+ DTS ⚡️ Build success in 9913ms
19
19
  DTS dist/index.d.ts 557.00 B
20
20
  DTS dist/index.d.mts 557.00 B
@@ -14,78 +14,75 @@
14
14
  ESM Build start
15
15
  CJS You have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin
16
16
  ESM You have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin
17
- CJS dist/index.js 11.93 KB
18
- CJS ⚡️ Build success in 184ms
19
- ESM dist/index.mjs 9.74 KB
20
- ESM ⚡️ Build success in 184ms
17
+ ESM dist/index.mjs 10.45 KB
18
+ ESM ⚡️ Build success in 187ms
19
+ CJS dist/index.js 12.68 KB
20
+ CJS ⚡️ Build success in 189ms
21
21
  DTS Build start
22
- DTS ⚡️ Build success in 7950ms
22
+ DTS ⚡️ Build success in 7246ms
23
23
  DTS dist/index.d.ts 557.00 B
24
24
  DTS dist/index.d.mts 557.00 B
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
- [10:56:35 PM] [semantic-release] › ℹ Running semantic-release version 24.1.0
30
- [10:56:36 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/exec"
31
- [10:56:36 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
32
- [10:56:36 PM] [semantic-release] › ✔ Loaded plugin "verifyRelease" from "@semantic-release/exec"
33
- [10:56:36 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/exec"
34
- [10:56:36 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/exec"
35
- [10:56:36 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
36
- [10:56:36 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/exec"
37
- [10:56:36 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/github"
38
- [10:56:41 PM] [semantic-release] › ✔ Run automated release from branch main on repository git+https://github.com/Pocket/pocket-monorepo.git
39
- [10:56:41 PM] [semantic-release] › ✔ Allowed to push to the Git repository
40
- [10:56:41 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/exec"
41
- [10:56:41 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/exec"
42
- [10:56:41 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
43
- [10:56:41 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication (https://api.github.com)
44
- [10:56:41 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/github"
45
- [10:56:41 PM] [semantic-release] › ℹ Found git tag @pocket-tools/tracing-v1.7.10 associated with version 1.7.10 on branch main
46
- [10:56:41 PM] [semantic-release] › ℹ Found 2 commits since last release
47
- [10:56:41 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
48
- [10:56:41 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
49
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 1 commits for package @pocket-tools/tracing since last release
50
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: feat(observability): group traces for background processes in ADD (#858)
29
+ [6:40:42 PM] [semantic-release] › ℹ Running semantic-release version 24.1.0
30
+ [6:40:43 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/exec"
31
+ [6:40:43 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
32
+ [6:40:43 PM] [semantic-release] › ✔ Loaded plugin "verifyRelease" from "@semantic-release/exec"
33
+ [6:40:43 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/exec"
34
+ [6:40:43 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/exec"
35
+ [6:40:43 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
36
+ [6:40:43 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/exec"
37
+ [6:40:43 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/github"
38
+ [6:40:47 PM] [semantic-release] › ✔ Run automated release from branch main on repository git+https://github.com/Pocket/pocket-monorepo.git
39
+ [6:40:47 PM] [semantic-release] › ✔ Allowed to push to the Git repository
40
+ [6:40:47 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/exec"
41
+ [6:40:47 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/exec"
42
+ [6:40:47 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
43
+ [6:40:47 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication (https://api.github.com)
44
+ [6:40:47 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/github"
45
+ [6:40:47 PM] [semantic-release] › ℹ Found git tag @pocket-tools/tracing-v1.8.1 associated with version 1.8.1 on branch main
46
+ [6:40:47 PM] [semantic-release] › ℹ Found 22 commits since last release
47
+ [6:40:47 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
48
+ [6:40:47 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
49
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 1 commits for package @pocket-tools/tracing since last release
50
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: fix(deps): update sentry-javascript monorepo to v8.35.0 (#883)
51
51
 
52
- Update documentation in tracing package on how to
53
- do local overrides for 100% sampling of traces.
54
-
55
- Add launch scripts for attaching and launching
56
- the ADD service.
57
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The release type for the commit is minor
58
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analysis of 1 commits complete: minor release
59
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
60
- [10:56:42 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
61
- [10:56:42 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
62
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/release-notes-generator" does not provide step "analyzeCommits"
63
- [10:56:42 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
64
- [10:56:42 PM] [semantic-release] › Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
65
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/exec"
66
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 1 commits for package @pocket-tools/tracing since last release
67
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] Completed step "analyzeCommits" of plugin "@semantic-release/exec"
68
- [10:56:42 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
69
- [10:56:42 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
70
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/github" does not provide step "analyzeCommits"
71
- [10:56:42 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
72
- [10:56:42 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
73
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
74
- [10:56:42 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
75
- [10:56:42 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
76
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
77
- [10:56:42 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
78
- [10:56:42 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
79
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
80
- [10:56:42 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
81
- [10:56:42 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
82
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
83
- [10:56:42 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
84
- [10:56:42 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
85
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
86
- [10:56:42 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
87
- [10:56:42 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
88
- [10:56:42 PM] [semantic-release] [[Function: semantic-release-monorepo]] No more plugins
89
- [10:56:42 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
90
- [10:56:42 PM] [semantic-release] › ℹ The next release version is 1.8.0
91
- [10:56:42 PM] [semantic-release] › ℹ Start step "verifyRelease" of plugin "@semantic-release/exec"
52
+ Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
53
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The release type for the commit is patch
54
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analysis of 1 commits complete: patch release
55
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] ℹ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
56
+ [6:40:48 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
57
+ [6:40:48 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
58
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/release-notes-generator" does not provide step "analyzeCommits"
59
+ [6:40:48 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
60
+ [6:40:48 PM] [semantic-release] › Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
61
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/exec"
62
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 1 commits for package @pocket-tools/tracing since last release
63
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] Completed step "analyzeCommits" of plugin "@semantic-release/exec"
64
+ [6:40:48 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
65
+ [6:40:48 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
66
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/github" does not provide step "analyzeCommits"
67
+ [6:40:48 PM] [semantic-release] › Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
68
+ [6:40:48 PM] [semantic-release] › Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
69
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
70
+ [6:40:48 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
71
+ [6:40:48 PM] [semantic-release] › Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
72
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
73
+ [6:40:48 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
74
+ [6:40:48 PM] [semantic-release] › Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
75
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
76
+ [6:40:48 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
77
+ [6:40:48 PM] [semantic-release] › Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
78
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
79
+ [6:40:48 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
80
+ [6:40:48 PM] [semantic-release] › Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
81
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
82
+ [6:40:48 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
83
+ [6:40:48 PM] [semantic-release] › Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
84
+ [6:40:48 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
85
+ [6:40:48 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
86
+ [6:40:48 PM] [semantic-release] › The next release version is 1.8.2
87
+ [6:40:48 PM] [semantic-release] › ℹ Start step "verifyRelease" of plugin "@semantic-release/exec"
88
+ [6:40:48 PM] [semantic-release] › Completed step "verifyRelease" of plugin "@semantic-release/exec"
package/dist/index.js CHANGED
@@ -47,6 +47,9 @@ 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");
50
53
  var import_auto_instrumentations_node = require("@opentelemetry/auto-instrumentations-node");
51
54
  var import_resources2 = require("@opentelemetry/resources");
52
55
  var import_resource_detector_aws = require("@opentelemetry/resource-detector-aws");
@@ -109,6 +112,15 @@ async function nodeSDKBuilder(config) {
109
112
  //collector url
110
113
  url: `${config.url}/v1/traces`
111
114
  }) : new import_exporter_trace_otlp_grpc.OTLPTraceExporter({ url: config.url });
115
+ const _metricReader = new import_sdk_metrics.PeriodicExportingMetricReader({
116
+ exporter: config.protocol === "HTTP" ? new import_exporter_metrics_otlp_http.OTLPMetricExporter({
117
+ url: `${config.url}/v1/metrics`
118
+ }) : new import_exporter_metrics_otlp_grpc.OTLPMetricExporter({ url: config.url }),
119
+ // once every 60 seconds, GCP supports 1 every 5 seconds for custom metrics https://cloud.google.com/monitoring/quotas#custom_metrics_quotas
120
+ // But lets just do 60 seconds for now as we figure it out
121
+ exportIntervalMillis: 1e4,
122
+ exportTimeoutMillis: 5e3
123
+ });
112
124
  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 });
113
125
  const instrumentations = [
114
126
  (0, import_auto_instrumentations_node.getNodeAutoInstrumentations)({
@@ -171,8 +183,7 @@ async function nodeSDKBuilder(config) {
171
183
  resource: _resource,
172
184
  idGenerator: new import_id_generator_aws_xray.AWSXRayIdGenerator(),
173
185
  spanProcessors: [new import_sdk_trace_base.BatchSpanProcessor(_traceExporter, batchConfig)],
174
- // Disabling metrics until traces feel in the right space.
175
- // metricReader: _metricReader,
186
+ metricReader: _metricReader,
176
187
  logRecordProcessors: [
177
188
  new import_sdk_node.logs.BatchLogRecordProcessor(_logExporter, batchConfig)
178
189
  ],
package/dist/index.mjs CHANGED
@@ -19,6 +19,9 @@ import {
19
19
  ATTR_SERVICE_VERSION
20
20
  } from "@opentelemetry/semantic-conventions";
21
21
  import { SentryPropagator, wrapSamplingDecision } from "@sentry/opentelemetry";
22
+ import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
23
+ import { OTLPMetricExporter as HTTPOTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http";
24
+ import { OTLPMetricExporter as GRPCOTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-grpc";
22
25
  import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";
23
26
  import {
24
27
  envDetectorSync,
@@ -89,6 +92,15 @@ async function nodeSDKBuilder(config) {
89
92
  //collector url
90
93
  url: `${config.url}/v1/traces`
91
94
  }) : new GRPCOTLPTraceExporter({ url: config.url });
95
+ const _metricReader = new PeriodicExportingMetricReader({
96
+ exporter: config.protocol === "HTTP" ? new HTTPOTLPMetricExporter({
97
+ url: `${config.url}/v1/metrics`
98
+ }) : new GRPCOTLPMetricExporter({ url: config.url }),
99
+ // once every 60 seconds, GCP supports 1 every 5 seconds for custom metrics https://cloud.google.com/monitoring/quotas#custom_metrics_quotas
100
+ // But lets just do 60 seconds for now as we figure it out
101
+ exportIntervalMillis: 1e4,
102
+ exportTimeoutMillis: 5e3
103
+ });
92
104
  const _logExporter = config.protocol === "HTTP" ? new HTTPOTLPLogExporter({ url: `${config.url}/v1/logs` }) : new GRPCOTLPLogExporter({ url: config.url });
93
105
  const instrumentations = [
94
106
  getNodeAutoInstrumentations({
@@ -151,8 +163,7 @@ async function nodeSDKBuilder(config) {
151
163
  resource: _resource,
152
164
  idGenerator: new AWSXRayIdGenerator(),
153
165
  spanProcessors: [new BatchSpanProcessor(_traceExporter, batchConfig)],
154
- // Disabling metrics until traces feel in the right space.
155
- // metricReader: _metricReader,
166
+ metricReader: _metricReader,
156
167
  logRecordProcessors: [
157
168
  new logs.BatchLogRecordProcessor(_logExporter, batchConfig)
158
169
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocket-tools/tracing",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "Utilities for tracing",
5
5
  "keywords": [
6
6
  "tracing"
@@ -85,8 +85,8 @@
85
85
  "@opentelemetry/semantic-conventions": "1.27.0",
86
86
  "@opentelemetry/winston-transport": "0.6.0",
87
87
  "@prisma/instrumentation": "5.19.1",
88
- "@sentry/node": "8.34.0",
89
- "@sentry/opentelemetry": "8.34.0",
88
+ "@sentry/node": "8.35.0",
89
+ "@sentry/opentelemetry": "8.35.0",
90
90
  "tslib": "2.7.0",
91
91
  "unleash-client": "6.1.1"
92
92
  },