autotel-backends 2.15.2 → 3.0.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/README.md +2 -1
- package/dist/relay.cjs +8 -3
- package/dist/relay.js +8 -3
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -244,7 +244,8 @@ initFull({ service: 'web', endpoint: '/otel' });
|
|
|
244
244
|
|
|
245
245
|
It forwards `/v1/traces` and `/v1/logs` only, from the page's own origin only
|
|
246
246
|
(`allowedOrigins` adds others, with CORS), bodies up to `maxBodyBytes` (1 MiB),
|
|
247
|
-
and only `content-type
|
|
247
|
+
and only `content-type`, `content-encoding` and `user-agent` from the request,
|
|
248
|
+
so the backend sees the browser rather than the relay: never cookies.
|
|
248
249
|
The backend's status comes back (so the exporter's retries work), its body
|
|
249
250
|
does not.
|
|
250
251
|
|
package/dist/relay.cjs
CHANGED
|
@@ -26,8 +26,13 @@ const require_headers = require("./headers--QWNf7Su.cjs");
|
|
|
26
26
|
*/
|
|
27
27
|
/** OTLP signals a page exports. Metrics stay server-side. */
|
|
28
28
|
const SIGNALS = ["traces", "logs"];
|
|
29
|
-
/**
|
|
30
|
-
const
|
|
29
|
+
/** Request headers a page may set: what the payload needs to be read. */
|
|
30
|
+
const ALLOWED = ["content-type", "content-encoding"];
|
|
31
|
+
/**
|
|
32
|
+
* The only request headers forwarded. `user-agent` is the browser's own, so a
|
|
33
|
+
* backend that reads the client from it sees the browser rather than the relay.
|
|
34
|
+
*/
|
|
35
|
+
const FORWARDED = [...ALLOWED, "user-agent"];
|
|
31
36
|
/**
|
|
32
37
|
* The request body, or undefined once it passes `limit` bytes. Stops reading
|
|
33
38
|
* at that point and cancels the rest of the stream.
|
|
@@ -131,7 +136,7 @@ function otlpRelay(options) {
|
|
|
131
136
|
headers: {
|
|
132
137
|
...cors,
|
|
133
138
|
"access-control-allow-methods": "POST",
|
|
134
|
-
"access-control-allow-headers":
|
|
139
|
+
"access-control-allow-headers": ALLOWED.join(", "),
|
|
135
140
|
"access-control-max-age": "86400"
|
|
136
141
|
}
|
|
137
142
|
});
|
package/dist/relay.js
CHANGED
|
@@ -25,8 +25,13 @@ import { t as normalizeHeaders } from "./headers-B9KIbNlx.js";
|
|
|
25
25
|
*/
|
|
26
26
|
/** OTLP signals a page exports. Metrics stay server-side. */
|
|
27
27
|
const SIGNALS = ["traces", "logs"];
|
|
28
|
-
/**
|
|
29
|
-
const
|
|
28
|
+
/** Request headers a page may set: what the payload needs to be read. */
|
|
29
|
+
const ALLOWED = ["content-type", "content-encoding"];
|
|
30
|
+
/**
|
|
31
|
+
* The only request headers forwarded. `user-agent` is the browser's own, so a
|
|
32
|
+
* backend that reads the client from it sees the browser rather than the relay.
|
|
33
|
+
*/
|
|
34
|
+
const FORWARDED = [...ALLOWED, "user-agent"];
|
|
30
35
|
/**
|
|
31
36
|
* The request body, or undefined once it passes `limit` bytes. Stops reading
|
|
32
37
|
* at that point and cancels the rest of the stream.
|
|
@@ -130,7 +135,7 @@ function otlpRelay(options) {
|
|
|
130
135
|
headers: {
|
|
131
136
|
...cors,
|
|
132
137
|
"access-control-allow-methods": "POST",
|
|
133
|
-
"access-control-allow-headers":
|
|
138
|
+
"access-control-allow-headers": ALLOWED.join(", "),
|
|
134
139
|
"access-control-max-age": "86400"
|
|
135
140
|
}
|
|
136
141
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autotel-backends",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Vendor backend configurations for Autotel (Honeycomb, Datadog, etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -77,14 +77,14 @@
|
|
|
77
77
|
"author": "Jag Reehal <jag@jagreehal.com> (https://jagreehal.com)",
|
|
78
78
|
"license": "Apache-2.0",
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"autotel": "
|
|
81
|
-
"@opentelemetry/exporter-logs-otlp-http": ">=0.
|
|
82
|
-
"@opentelemetry/sdk-logs": ">=
|
|
80
|
+
"autotel": "9.1.0",
|
|
81
|
+
"@opentelemetry/exporter-logs-otlp-http": ">=0.301.0",
|
|
82
|
+
"@opentelemetry/sdk-logs": ">=3.1.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
|
-
"@opentelemetry/exporter-metrics-otlp-http": ">=0.
|
|
86
|
-
"@opentelemetry/exporter-trace-otlp-http": ">=0.
|
|
87
|
-
"@opentelemetry/sdk-metrics": ">=
|
|
85
|
+
"@opentelemetry/exporter-metrics-otlp-http": ">=0.301.0",
|
|
86
|
+
"@opentelemetry/exporter-trace-otlp-http": ">=0.301.0",
|
|
87
|
+
"@opentelemetry/sdk-metrics": ">=3.1.0",
|
|
88
88
|
"google-auth-library": ">=10.9.1"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|