@podium/client 5.3.6 → 5.4.1

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,3 +1,17 @@
1
+ ## [5.4.1](https://github.com/podium-lib/client/compare/v5.4.0...v5.4.1) (2025-09-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * always end timer on error ([#477](https://github.com/podium-lib/client/issues/477)) ([e41a9bc](https://github.com/podium-lib/client/commit/e41a9bce72a16fa0288e8f2df3a3fc67223ba0ad))
7
+
8
+ # [5.4.0](https://github.com/podium-lib/client/compare/v5.3.6...v5.4.0) (2025-08-07)
9
+
10
+
11
+ ### Features
12
+
13
+ * forward traceparent and tracestate headers ([#474](https://github.com/podium-lib/client/issues/474)) ([717e880](https://github.com/podium-lib/client/commit/717e8809afcf7a56e17dff602e213578c36937d4))
14
+
1
15
  ## [5.3.6](https://github.com/podium-lib/client/compare/v5.3.5...v5.3.6) (2025-07-02)
2
16
 
3
17
 
@@ -136,6 +136,18 @@ export default class PodletClientHttpOutgoing extends PassThrough {
136
136
 
137
137
  this.#headers = {};
138
138
 
139
+ // We want to automatically forward the traceparent and tracestate
140
+ // HTTP headers as-is (no `podium-` prefix) for the automatic
141
+ // association between OpenTelemetry traces in a distributed system.
142
+ if (this.#incoming?.request?.headers?.['traceparent']) {
143
+ this.#headers['traceparent'] =
144
+ this.#incoming.request.headers['traceparent'];
145
+ }
146
+ if (this.#incoming?.request?.headers?.['tracestate']) {
147
+ this.#headers['tracestate'] =
148
+ this.#incoming.request.headers['tracestate'];
149
+ }
150
+
139
151
  // How long the manifest should be cached before refetched
140
152
  this.#maxAge = maxAge;
141
153
 
@@ -287,6 +287,13 @@ export default class PodletClientContentResolver {
287
287
  },
288
288
  });
289
289
  } catch (error) {
290
+ timer({
291
+ labels: {
292
+ status: 'failure',
293
+ statusCode: error.statusCode || 500,
294
+ },
295
+ });
296
+
290
297
  if (error.isBoom) throw error;
291
298
 
292
299
  if (error.name === 'AbortError') {
@@ -299,13 +306,6 @@ export default class PodletClientContentResolver {
299
306
  );
300
307
  }
301
308
 
302
- timer({
303
- labels: {
304
- status: 'failure',
305
- statusCode: error.statusCode || 500,
306
- },
307
- });
308
-
309
309
  // Network error
310
310
  if (outgoing.throwable) {
311
311
  throw badGateway(`Error reading content at ${uri}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podium/client",
3
- "version": "5.3.6",
3
+ "version": "5.4.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -101,29 +101,29 @@
101
101
  "undici": "6.21.3"
102
102
  },
103
103
  "devDependencies": {
104
- "@podium/eslint-config": "1.0.14",
104
+ "@podium/eslint-config": "1.0.18",
105
105
  "@podium/podlet": "5.2.4",
106
- "@podium/semantic-release-config": "2.0.0",
106
+ "@podium/semantic-release-config": "2.0.2",
107
107
  "@podium/test-utils": "3.0.18",
108
108
  "@podium/typescript-config": "1.0.0",
109
109
  "@semantic-release/changelog": "6.0.3",
110
110
  "@semantic-release/git": "10.0.1",
111
111
  "@semantic-release/github": "10.3.5",
112
- "@semantic-release/npm": "12.0.1",
112
+ "@semantic-release/npm": "12.0.2",
113
113
  "@semantic-release/release-notes-generator": "13.0.0",
114
114
  "@sinonjs/fake-timers": "11.3.1",
115
115
  "@types/readable-stream": "4.0.21",
116
116
  "benchmark": "2.1.4",
117
- "eslint": "9.28.0",
118
- "eslint-config-prettier": "9.1.0",
119
- "eslint-plugin-prettier": "5.4.1",
117
+ "eslint": "9.32.0",
118
+ "eslint-config-prettier": "9.1.2",
119
+ "eslint-plugin-prettier": "5.5.3",
120
120
  "express": "4.21.2",
121
121
  "get-stream": "9.0.1",
122
122
  "http-proxy": "1.18.1",
123
123
  "is-stream": "4.0.1",
124
124
  "npm-run-all2": "6.2.6",
125
- "prettier": "3.5.3",
126
- "semantic-release": "24.2.3",
125
+ "prettier": "3.6.2",
126
+ "semantic-release": "24.2.7",
127
127
  "tap": "18.8.0",
128
128
  "typescript": "5.8.3",
129
129
  "why-is-node-running": "3.2.2"