@zyno-io/ts-server-foundation 26.811.2115 → 26.813.636
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/dist/src/http/request.js +1 -1
- package/dist/src/telemetry/otel/index.d.ts +1 -0
- package/dist/src/telemetry/otel/index.d.ts.map +1 -1
- package/dist/src/telemetry/otel/index.js +2 -2
- package/dist/src/telemetry/otel/index.js.map +1 -1
- package/docs/content/telemetry.md +11 -8
- package/package.json +2 -2
package/dist/src/http/request.js
CHANGED
|
@@ -8,7 +8,7 @@ const node_zlib_1 = require("node:zlib");
|
|
|
8
8
|
const errors_1 = require("./errors");
|
|
9
9
|
const form_body_1 = require("./form-body");
|
|
10
10
|
const headers_1 = require("./headers");
|
|
11
|
-
const __tsf_metadata_type = _a.createCompactMetadataRegistryV1("[1,[{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":2,\"typeName\":\"symbol\"}]},{\"kind\":2}],\"index\":{\"kind\":2},\"types\":[]},{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":6}],\"index\":{\"kind\":6},\"types\":[]},{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":14,\"type\":{\"kind\":6}}]}],\"index\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":14,\"type\":{\"kind\":6}}]},\"types\":[]},{\"kind\":6},{\"kind\":13,\"types\":[{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":6}],\"index\":{\"kind\":6},\"types\":[]},{\"kind\":2,\"typeName\":\"(headers: HttpHeaderInput) =\\u003e HttpRequest\"}],\"typeName\":\"HttpRequestHeaders\"},{\"kind\":2},{\"kind\":18,\"typeName\":\"HttpRequestBodyLimits\",\"types\":[{\"kind\":20,\"name\":\"maxFormFields\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormFieldNameLength\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormDepth\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormArrayIndex\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxBodyBytes\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxCompressedBodyBytes\",\"type\":{\"kind\":7},\"optional\":false}]},{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":7},{\"kind\":8}]},{\"kind\":17},{\"kind\":22,\"type\":{\"kind\":6}},{\"kind\":18,\"typeName\":\"Partial\",\"utilityType\":\"Partial\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"HttpRequestBodyLimits\",\"types\":[{\"kind\":20,\"name\":\"maxFormFields\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormFieldNameLength\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormDepth\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormArrayIndex\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxBodyBytes\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxCompressedBodyBytes\",\"type\":{\"kind\":7},\"optional\":false}]}],\"utilityKeys\":[],\"types\":[{\"kind\":20,\"name\":\"maxFormFields\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormFieldNameLength\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormDepth\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormArrayIndex\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxBodyBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxCompressedBodyBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},{\"kind\":3},{\"kind\":7},{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"GET\"},{\"kind\":10,\"literal\":\"POST\"},{\"kind\":10,\"literal\":\"PUT\"},{\"kind\":10,\"literal\":\"PATCH\"},{\"kind\":10,\"literal\":\"DELETE\"},{\"kind\":10,\"literal\":\"OPTIONS\"},{\"kind\":10,\"literal\":\"HEAD\"}],\"typeName\":\"KnownHttpMethod\"},{\"kind\":13,\"types\":[{\"kind\":6},{\"kind\":18,\"types\":[]}]}],\"typeName\":\"HttpMethod\"},{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":
|
|
11
|
+
const __tsf_metadata_type = _a.createCompactMetadataRegistryV1("[1,[{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":2,\"typeName\":\"symbol\"}]},{\"kind\":2}],\"index\":{\"kind\":2},\"types\":[]},{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":6}],\"index\":{\"kind\":6},\"types\":[]},{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":14,\"type\":{\"kind\":6}}]}],\"index\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":14,\"type\":{\"kind\":6}}]},\"types\":[]},{\"kind\":6},{\"kind\":13,\"types\":[{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":6}],\"index\":{\"kind\":6},\"types\":[]},{\"kind\":2,\"typeName\":\"(headers: HttpHeaderInput) =\\u003e HttpRequest\"}],\"typeName\":\"HttpRequestHeaders\"},{\"kind\":2},{\"kind\":18,\"typeName\":\"HttpRequestBodyLimits\",\"types\":[{\"kind\":20,\"name\":\"maxFormFields\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormFieldNameLength\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormDepth\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormArrayIndex\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxBodyBytes\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxCompressedBodyBytes\",\"type\":{\"kind\":7},\"optional\":false}]},{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":7},{\"kind\":8}]},{\"kind\":17},{\"kind\":22,\"type\":{\"kind\":6}},{\"kind\":18,\"typeName\":\"Partial\",\"utilityType\":\"Partial\",\"typeArguments\":[{\"kind\":18,\"typeName\":\"HttpRequestBodyLimits\",\"types\":[{\"kind\":20,\"name\":\"maxFormFields\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormFieldNameLength\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormDepth\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxFormArrayIndex\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxBodyBytes\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"maxCompressedBodyBytes\",\"type\":{\"kind\":7},\"optional\":false}]}],\"utilityKeys\":[],\"types\":[{\"kind\":20,\"name\":\"maxFormFields\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormFieldNameLength\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormDepth\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxFormArrayIndex\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxBodyBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxCompressedBodyBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},{\"kind\":3},{\"kind\":7},{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"GET\"},{\"kind\":10,\"literal\":\"POST\"},{\"kind\":10,\"literal\":\"PUT\"},{\"kind\":10,\"literal\":\"PATCH\"},{\"kind\":10,\"literal\":\"DELETE\"},{\"kind\":10,\"literal\":\"OPTIONS\"},{\"kind\":10,\"literal\":\"HEAD\"}],\"typeName\":\"KnownHttpMethod\"},{\"kind\":13,\"types\":[{\"kind\":6},{\"kind\":18,\"types\":[]}]}],\"typeName\":\"HttpMethod\"},{\"kind\":18,\"typeName\":\"Record\",\"utilityType\":\"Record\",\"typeArguments\":[{\"kind\":6},{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":14,\"type\":{\"kind\":6}},{\"kind\":7},{\"kind\":8},{\"kind\":4}]}],\"index\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":14,\"type\":{\"kind\":6}},{\"kind\":7},{\"kind\":8},{\"kind\":4}]},\"types\":[],\"typeName\":\"HttpHeaderInput\"},{\"kind\":2,\"typeName\":\"(error?: Error | null, data?: Buffer) =\\u003e void\"},{\"kind\":2,\"typeName\":\"(chunk: Buffer) =\\u003e void\"}]]", []);
|
|
12
12
|
exports.defaultHttpRequestBodyLimits = {
|
|
13
13
|
maxBodyBytes: 100 * 1024 * 1024,
|
|
14
14
|
maxCompressedBodyBytes: 25 * 1024 * 1024,
|
|
@@ -12,6 +12,7 @@ export interface TelemetryInitOptions {
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
instrumentations?: Instrumentation[];
|
|
14
14
|
httpIncomingRequestAttributeHook?: HttpIncomingRequestAttributeHook;
|
|
15
|
+
enableRedisInstrumentation?: boolean;
|
|
15
16
|
enableMetricsEndpoint?: boolean;
|
|
16
17
|
spanProcessors?: SpanProcessor[];
|
|
17
18
|
metricReaders?: MetricReader[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/otel/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,WAAW,CAAC;AAEjE,OAAO,EAA+E,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAItI,OAAO,EAA4B,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAQhG,OAAO,EAAgD,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC7G,OAAO,EAA2C,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAW5G,cAAc,WAAW,CAAC;AAE1B,MAAM,MAAM,gCAAgC,GAAG,CAAC,OAAO,EAAE,eAAe,KAAK,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAE5G,MAAM,WAAW,oBAAoB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,gCAAgC,CAAC,EAAE,g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C;IACjC,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC;AAED,MAAM,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAEhD,wBAAgB,IAAI,CAAC,OAAO,GAAE,oBAAyB,GAAG,IAAI,CAwC7D;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAgBvD;AAED,wBAAgB,sBAAsB,IAAI,IAAI,CA4B7C"}
|
|
@@ -170,7 +170,7 @@ function createDefaultInstrumentations(options) {
|
|
|
170
170
|
ignoreRequestHook: (request) => /(\/healthz|\/readyz|\/livez|\/metrics|sentry\.)/.test(`${request.origin}${request.path}`)
|
|
171
171
|
}),
|
|
172
172
|
new instrumentation_dns_1.DnsInstrumentation(),
|
|
173
|
-
new instrumentation_ioredis_1.IORedisInstrumentation(),
|
|
173
|
+
...(options.enableRedisInstrumentation === true ? [new instrumentation_ioredis_1.IORedisInstrumentation()] : []),
|
|
174
174
|
new instrumentation_mysql2_1.MySQL2Instrumentation(),
|
|
175
175
|
new instrumentation_pg_1.PgInstrumentation(),
|
|
176
176
|
...(options.instrumentations ?? [])
|
|
@@ -217,5 +217,5 @@ function restoreHttpTraceContextResolver() {
|
|
|
217
217
|
previousHttpContextResolver = undefined;
|
|
218
218
|
httpContextResolverInstalled = false;
|
|
219
219
|
}
|
|
220
|
-
exports.__tsfTypeAliases = _a.decodeCompactMetadataV1("[1,{\"HttpIncomingRequestAttributeHook\":{\"kind\":2,\"typeName\":\"(request: IncomingMessage) =\\u003e Record\\u003cstring, AttributeValue\\u003e\",\"typeName\":\"HttpIncomingRequestAttributeHook\"},\"IOtelOptions\":{\"kind\":18,\"typeName\":\"TelemetryInitOptions\",\"types\":[{\"kind\":20,\"name\":\"serviceName\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"serviceVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"disabled\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"instrumentations\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/instrumentation\",\"Instrumentation\",\"Instrumentation\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"httpIncomingRequestAttributeHook\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"(request: IncomingMessage) =\\u003e Record\\u003cstring, AttributeValue\\u003e\",\"typeName\":\"HttpIncomingRequestAttributeHook\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"enableMetricsEndpoint\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"spanProcessors\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/sdk-trace-base\",\"SpanProcessor\",\"SpanProcessor\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"metricReaders\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/sdk-metrics\",\"MetricReader\",\"MetricReader\"]}},{\"kind\":4}]},\"optional\":true}],\"typeName\":\"IOtelOptions\"},\"SpanInfo\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"traceId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"spanId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"traceFlags\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"traceparent\",\"type\":{\"kind\":6},\"optional\":false}]},{\"kind\":4}],\"typeName\":\"SpanInfo\"},\"SpanLinkRef\":{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"traceId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"spanId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"traceFlags\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"attributes\",\"type\":{\"kind\":12,\"types\":[{\"$tsfAlias\":[0,\"@opentelemetry/api\",\"Attributes\",\"Attributes\"]},{\"kind\":4}]},\"optional\":true}],\"typeName\":\"SpanLinkRef\"},\"TelemetryInitOptions\":{\"kind\":18,\"typeName\":\"TelemetryInitOptions\",\"types\":[{\"kind\":20,\"name\":\"serviceName\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"serviceVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"disabled\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"instrumentations\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/instrumentation\",\"Instrumentation\",\"Instrumentation\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"httpIncomingRequestAttributeHook\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"(request: IncomingMessage) =\\u003e Record\\u003cstring, AttributeValue\\u003e\",\"typeName\":\"HttpIncomingRequestAttributeHook\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"enableMetricsEndpoint\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"spanProcessors\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/sdk-trace-base\",\"SpanProcessor\",\"SpanProcessor\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"metricReaders\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/sdk-metrics\",\"MetricReader\",\"MetricReader\"]}},{\"kind\":4}]},\"optional\":true}]}}]", [require]);
|
|
220
|
+
exports.__tsfTypeAliases = _a.decodeCompactMetadataV1("[1,{\"HttpIncomingRequestAttributeHook\":{\"kind\":2,\"typeName\":\"(request: IncomingMessage) =\\u003e Record\\u003cstring, AttributeValue\\u003e\",\"typeName\":\"HttpIncomingRequestAttributeHook\"},\"IOtelOptions\":{\"kind\":18,\"typeName\":\"TelemetryInitOptions\",\"types\":[{\"kind\":20,\"name\":\"serviceName\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"serviceVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"disabled\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"instrumentations\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/instrumentation\",\"Instrumentation\",\"Instrumentation\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"httpIncomingRequestAttributeHook\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"(request: IncomingMessage) =\\u003e Record\\u003cstring, AttributeValue\\u003e\",\"typeName\":\"HttpIncomingRequestAttributeHook\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"enableRedisInstrumentation\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"enableMetricsEndpoint\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"spanProcessors\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/sdk-trace-base\",\"SpanProcessor\",\"SpanProcessor\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"metricReaders\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/sdk-metrics\",\"MetricReader\",\"MetricReader\"]}},{\"kind\":4}]},\"optional\":true}],\"typeName\":\"IOtelOptions\"},\"SpanInfo\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"traceId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"spanId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"traceFlags\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true}]},{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"traceparent\",\"type\":{\"kind\":6},\"optional\":false}]},{\"kind\":4}],\"typeName\":\"SpanInfo\"},\"SpanLinkRef\":{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"traceId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"spanId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"traceFlags\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"attributes\",\"type\":{\"kind\":12,\"types\":[{\"$tsfAlias\":[0,\"@opentelemetry/api\",\"Attributes\",\"Attributes\"]},{\"kind\":4}]},\"optional\":true}],\"typeName\":\"SpanLinkRef\"},\"TelemetryInitOptions\":{\"kind\":18,\"typeName\":\"TelemetryInitOptions\",\"types\":[{\"kind\":20,\"name\":\"serviceName\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"serviceVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"disabled\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"instrumentations\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/instrumentation\",\"Instrumentation\",\"Instrumentation\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"httpIncomingRequestAttributeHook\",\"type\":{\"kind\":12,\"types\":[{\"kind\":2,\"typeName\":\"(request: IncomingMessage) =\\u003e Record\\u003cstring, AttributeValue\\u003e\",\"typeName\":\"HttpIncomingRequestAttributeHook\"},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"enableRedisInstrumentation\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"enableMetricsEndpoint\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"spanProcessors\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/sdk-trace-base\",\"SpanProcessor\",\"SpanProcessor\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"metricReaders\",\"type\":{\"kind\":12,\"types\":[{\"kind\":14,\"type\":{\"$tsfAlias\":[0,\"@opentelemetry/sdk-metrics\",\"MetricReader\",\"MetricReader\"]}},{\"kind\":4}]},\"optional\":true}]}}]", [require]);
|
|
221
221
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/telemetry/otel/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,0BAAwB;AAExB,qCAAmC;AAGnC,4CAAsI;AACtI,0FAA+E;AAC/E,4EAAw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C,CAAC,CAAC,OAAO,CAAC;IACvD,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,+BAA+B;IACpC,IAAI,2BAA2B;QAAE,IAAA,gCAAsB,EAAC,2BAA2B,CAAC,CAAC;IACrF,2BAA2B,GAAG,SAAS,CAAC;IACxC,4BAA4B,GAAG,KAAK,CAAC;AACzC,CAAC"}
|
|
@@ -22,6 +22,7 @@ const { createApp } = await import('@zyno-io/ts-server-foundation');
|
|
|
22
22
|
init({
|
|
23
23
|
serviceName: 'api',
|
|
24
24
|
serviceVersion: '1.2.3',
|
|
25
|
+
enableRedisInstrumentation: true,
|
|
25
26
|
enableMetricsEndpoint: true,
|
|
26
27
|
httpIncomingRequestAttributeHook: request => ({
|
|
27
28
|
'http.request.host': request.headers.host ?? ''
|
|
@@ -38,6 +39,7 @@ Options:
|
|
|
38
39
|
| `disabled` | Skips initialization when true. |
|
|
39
40
|
| `instrumentations` | Additional OpenTelemetry instrumentations. |
|
|
40
41
|
| `httpIncomingRequestAttributeHook` | Adds attributes to incoming HTTP spans. |
|
|
42
|
+
| `enableRedisInstrumentation` | Set to `true` to enable built-in ioredis tracing. |
|
|
41
43
|
| `enableMetricsEndpoint` | Enables the Prometheus `/metrics` endpoint. |
|
|
42
44
|
| `spanProcessors` | Custom trace span processors. |
|
|
43
45
|
| `metricReaders` | Custom metric readers. |
|
|
@@ -59,13 +61,13 @@ Trace providers are installed when an OTLP trace endpoint or custom span process
|
|
|
59
61
|
|
|
60
62
|
TSF adds these resource attributes to installed trace and metric providers:
|
|
61
63
|
|
|
62
|
-
| Attribute
|
|
63
|
-
|
|
|
64
|
-
| `service.name`
|
|
65
|
-
| `service.version`
|
|
66
|
-
| `deployment.environment` | `APP_ENV`.
|
|
67
|
-
| `host.name`
|
|
68
|
-
| `process.pid`
|
|
64
|
+
| Attribute | Source |
|
|
65
|
+
| ------------------------ | ------------------------------------------------------------------- |
|
|
66
|
+
| `service.name` | `serviceName`, then the working package name, then `unknown`. |
|
|
67
|
+
| `service.version` | `serviceVersion`, then the working package version, then `unknown`. |
|
|
68
|
+
| `deployment.environment` | `APP_ENV`. |
|
|
69
|
+
| `host.name` | Operating-system hostname. |
|
|
70
|
+
| `process.pid` | Current process ID. |
|
|
69
71
|
|
|
70
72
|
The default OTLP trace exporter uses a `SimpleSpanProcessor` in development and a `BatchSpanProcessor` otherwise. OTLP metrics use a periodic reader with a 10-second export interval. Passing custom `spanProcessors` or `metricReaders` replaces the corresponding default processor/reader choice while retaining any separately enabled Prometheus endpoint.
|
|
71
73
|
|
|
@@ -76,10 +78,11 @@ Default instrumentation includes:
|
|
|
76
78
|
- HTTP
|
|
77
79
|
- Undici
|
|
78
80
|
- DNS
|
|
79
|
-
- ioredis
|
|
80
81
|
- mysql2
|
|
81
82
|
- pg
|
|
82
83
|
|
|
84
|
+
ioredis instrumentation is disabled by default. Set `enableRedisInstrumentation: true` to include it. This does not affect an ioredis instrumentation passed explicitly through `instrumentations`.
|
|
85
|
+
|
|
83
86
|
HTTP context is connected to TSF request handling so request logs and Sentry events can include trace context.
|
|
84
87
|
|
|
85
88
|
## Metrics Endpoint
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zyno-io/ts-server-foundation",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.813.636",
|
|
4
4
|
"description": "TypeScript server foundation with reflected type metadata",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@ttsc/graph": "^0.25.0",
|
|
91
91
|
"@types/ws": "^8.18.1",
|
|
92
92
|
"@zyno-io/config": "^1.14.0",
|
|
93
|
-
"@zyno-io/ts-reflection": "26.
|
|
93
|
+
"@zyno-io/ts-reflection": "26.813.636",
|
|
94
94
|
"bcrypt": "^6.0.0",
|
|
95
95
|
"bullmq": "^6.0.9",
|
|
96
96
|
"busboy": "^1.6.0",
|