@prairielearn/opentelemetry 1.10.0 → 1.10.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @prairielearn/opentelemetry
2
2
 
3
+ ## 1.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 8dd894623: Upgrade all dependencies
8
+
9
+ ## 1.10.1
10
+
11
+ ### Patch Changes
12
+
13
+ - bd0053577: Upgrade all dependencies
14
+
3
15
  ## 1.10.0
4
16
 
5
17
  ### Minor Changes
@@ -59,11 +59,12 @@ describe('instrumentedWithMetrics', () => {
59
59
  await waitForMetricsExport(exporter);
60
60
  const exportedMetrics = exporter.getMetrics();
61
61
  const { scope, metrics } = exportedMetrics[0].scopeMetrics[0];
62
- const [counterMetric, histogramMetric] = metrics;
62
+ // We won't see an exported metric for the error counter because the
63
+ // Metrics SDK no longer exports metrics with no data points.
64
+ // https://github.com/open-telemetry/opentelemetry-js/pull/4135
65
+ chai_1.assert.lengthOf(metrics, 1);
66
+ const [histogramMetric] = metrics;
63
67
  chai_1.assert.equal(scope.name, 'test');
64
- chai_1.assert.ok(counterMetric);
65
- chai_1.assert.equal(counterMetric.descriptor.name, 'test.error');
66
- chai_1.assert.lengthOf(counterMetric.dataPoints, 0);
67
68
  chai_1.assert.ok(histogramMetric);
68
69
  chai_1.assert.equal(histogramMetric.descriptor.name, 'test.duration');
69
70
  chai_1.assert.equal(histogramMetric.dataPoints[0].value.count, 1);
@@ -75,6 +76,9 @@ describe('instrumentedWithMetrics', () => {
75
76
  await waitForMetricsExport(exporter);
76
77
  const exportedMetrics = exporter.getMetrics();
77
78
  const { metrics, scope } = exportedMetrics[0].scopeMetrics[0];
79
+ // An error was reported above, so there will be both the error counter
80
+ // and histogram metrics.
81
+ chai_1.assert.lengthOf(metrics, 2);
78
82
  const [counterMetric, histogramMetric] = metrics;
79
83
  chai_1.assert.ok(scope);
80
84
  ch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AAC;QAC1D,aAAM,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAEnD,aAAM,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC;QAC3B,aAAM,CAAC,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAC/D,aAAM,CAAC,KAAK,CAAE,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAmB,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prairielearn/opentelemetry",
3
- "version": "1.10.0",
3
+ "version": "1.10.2",
4
4
  "main": "dist/index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,34 +13,34 @@
13
13
  "test": "mocha --no-config --require ts-node/register src/**/*.test.ts"
14
14
  },
15
15
  "dependencies": {
16
- "@grpc/grpc-js": "^1.9.2",
17
- "@opentelemetry/api": "^1.4.1",
18
- "@opentelemetry/core": "^1.15.2",
19
- "@opentelemetry/exporter-jaeger": "^1.15.2",
20
- "@opentelemetry/exporter-metrics-otlp-grpc": "^0.41.2",
21
- "@opentelemetry/exporter-trace-otlp-grpc": "^0.41.2",
22
- "@opentelemetry/instrumentation": "^0.41.2",
23
- "@opentelemetry/instrumentation-aws-sdk": "^0.36.0",
24
- "@opentelemetry/instrumentation-connect": "^0.32.1",
25
- "@opentelemetry/instrumentation-dns": "^0.32.2",
26
- "@opentelemetry/instrumentation-express": "^0.33.1",
27
- "@opentelemetry/instrumentation-http": "^0.41.2",
28
- "@opentelemetry/instrumentation-pg": "^0.36.1",
29
- "@opentelemetry/instrumentation-redis": "^0.35.1",
30
- "@opentelemetry/resource-detector-aws": "^1.3.1",
31
- "@opentelemetry/resources": "^1.15.2",
32
- "@opentelemetry/sdk-metrics": "^1.15.2",
33
- "@opentelemetry/sdk-node": "^0.41.2",
34
- "@opentelemetry/sdk-trace-base": "^1.15.2",
35
- "@opentelemetry/sdk-trace-node": "^1.15.2",
36
- "@opentelemetry/semantic-conventions": "^1.15.2"
16
+ "@grpc/grpc-js": "^1.9.7",
17
+ "@opentelemetry/api": "^1.6.0",
18
+ "@opentelemetry/core": "^1.17.1",
19
+ "@opentelemetry/exporter-jaeger": "^1.17.1",
20
+ "@opentelemetry/exporter-metrics-otlp-grpc": "^0.44.0",
21
+ "@opentelemetry/exporter-trace-otlp-grpc": "^0.44.0",
22
+ "@opentelemetry/instrumentation": "^0.44.0",
23
+ "@opentelemetry/instrumentation-aws-sdk": "^0.36.1",
24
+ "@opentelemetry/instrumentation-connect": "^0.32.2",
25
+ "@opentelemetry/instrumentation-dns": "^0.32.3",
26
+ "@opentelemetry/instrumentation-express": "^0.33.2",
27
+ "@opentelemetry/instrumentation-http": "^0.44.0",
28
+ "@opentelemetry/instrumentation-pg": "^0.36.2",
29
+ "@opentelemetry/instrumentation-redis": "^0.35.2",
30
+ "@opentelemetry/resource-detector-aws": "^1.3.2",
31
+ "@opentelemetry/resources": "^1.17.1",
32
+ "@opentelemetry/sdk-metrics": "^1.17.1",
33
+ "@opentelemetry/sdk-node": "^0.44.0",
34
+ "@opentelemetry/sdk-trace-base": "^1.17.1",
35
+ "@opentelemetry/sdk-trace-node": "^1.17.1",
36
+ "@opentelemetry/semantic-conventions": "^1.17.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@prairielearn/tsconfig": "^0.0.0",
40
- "@types/chai": "^4.3.6",
41
- "@types/mocha": "^10.0.1",
42
- "@types/node": "^18.17.14",
43
- "chai": "^4.3.8",
40
+ "@types/chai": "^4.3.9",
41
+ "@types/mocha": "^10.0.3",
42
+ "@types/node": "^18.18.7",
43
+ "chai": "^4.3.10",
44
44
  "mocha": "^10.2.0",
45
45
  "ts-node": "^10.9.1",
46
46
  "typescript": "^5.2.2"
@@ -46,13 +46,14 @@ describe('instrumentedWithMetrics', () => {
46
46
  await waitForMetricsExport(exporter);
47
47
  const exportedMetrics = exporter.getMetrics();
48
48
  const { scope, metrics } = exportedMetrics[0].scopeMetrics[0];
49
- const [counterMetric, histogramMetric] = metrics;
50
49
 
51
- assert.equal(scope.name, 'test');
50
+ // We won't see an exported metric for the error counter because the
51
+ // Metrics SDK no longer exports metrics with no data points.
52
+ // https://github.com/open-telemetry/opentelemetry-js/pull/4135
53
+ assert.lengthOf(metrics, 1);
54
+ const [histogramMetric] = metrics;
52
55
 
53
- assert.ok(counterMetric);
54
- assert.equal(counterMetric.descriptor.name, 'test.error');
55
- assert.lengthOf(counterMetric.dataPoints, 0);
56
+ assert.equal(scope.name, 'test');
56
57
 
57
58
  assert.ok(histogramMetric);
58
59
  assert.equal(histogramMetric.descriptor.name, 'test.duration');
@@ -70,6 +71,10 @@ describe('instrumentedWithMetrics', () => {
70
71
  await waitForMetricsExport(exporter);
71
72
  const exportedMetrics = exporter.getMetrics();
72
73
  const { metrics, scope } = exportedMetrics[0].scopeMetrics[0];
74
+
75
+ // An error was reported above, so there will be both the error counter
76
+ // and histogram metrics.
77
+ assert.lengthOf(metrics, 2);
73
78
  const [counterMetric, histogramMetric] = metrics;
74
79
 
75
80
  assert.ok(scope);