@netwerk-digitaal-erfgoed/network-of-terms-query 2.8.1 → 2.9.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../src/instrumentation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../src/instrumentation.ts"],"names":[],"mappings":"AAwCA,eAAO,MAAM,oBAAoB,+EAMhC,CAAC;AAEF,eAAO,MAAM,sBAAsB,iFAOlC,CAAC"}
|
package/build/instrumentation.js
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
var _a;
|
|
2
|
+
import { ExponentialHistogramAggregation, MeterProvider, PeriodicExportingMetricReader, View, } from '@opentelemetry/sdk-metrics';
|
|
2
3
|
import { Resource } from '@opentelemetry/resources';
|
|
3
4
|
import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-proto';
|
|
4
5
|
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
|
|
5
6
|
import { metrics, ValueType } from '@opentelemetry/api';
|
|
7
|
+
const sourceQueriesHistogramName = 'queries.source';
|
|
6
8
|
const meterProvider = new MeterProvider({
|
|
7
9
|
resource: Resource.default().merge(new Resource({
|
|
8
10
|
[SemanticResourceAttributes.SERVICE_NAME]: 'network-of-terms',
|
|
9
11
|
})),
|
|
12
|
+
views: [
|
|
13
|
+
new View({
|
|
14
|
+
aggregation: new ExponentialHistogramAggregation(10),
|
|
15
|
+
instrumentName: sourceQueriesHistogramName,
|
|
16
|
+
}),
|
|
17
|
+
],
|
|
10
18
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
if ('test' !== process.env.NODE_ENV) {
|
|
20
|
+
meterProvider.addMetricReader(new PeriodicExportingMetricReader({
|
|
21
|
+
exporter: new OTLPMetricExporter(),
|
|
22
|
+
exportIntervalMillis: (_a = process.env.OTEL_METRIC_EXPORT_INTERVAL) !== null && _a !== void 0 ? _a : 60000,
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
15
25
|
metrics.setGlobalMeterProvider(meterProvider);
|
|
16
26
|
const meter = metrics.getMeter('default');
|
|
17
27
|
export const clientQueriesCounter = meter.createCounter('queries.client.counter', {
|
|
18
28
|
description: 'Number of user queries',
|
|
19
29
|
valueType: ValueType.INT,
|
|
20
30
|
});
|
|
21
|
-
export const sourceQueriesHistogram = meter.createHistogram(
|
|
31
|
+
export const sourceQueriesHistogram = meter.createHistogram(sourceQueriesHistogramName, {
|
|
22
32
|
description: 'Queries to terminology sources and their response times',
|
|
33
|
+
valueType: ValueType.INT,
|
|
34
|
+
unit: 'ms',
|
|
23
35
|
});
|
|
24
36
|
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../src/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,6BAA6B,
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../src/instrumentation.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,+BAA+B,EAC/B,aAAa,EACb,6BAA6B,EAC7B,IAAI,GACL,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAC,kBAAkB,EAAC,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAC,0BAA0B,EAAC,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAEtD,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAEpD,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC;IACtC,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAChC,IAAI,QAAQ,CAAC;QACX,CAAC,0BAA0B,CAAC,YAAY,CAAC,EAAE,kBAAkB;KAC9D,CAAC,CACH;IACD,KAAK,EAAE;QACL,IAAI,IAAI,CAAC;YACP,WAAW,EAAE,IAAI,+BAA+B,CAAC,EAAE,CAAC;YACpD,cAAc,EAAE,0BAA0B;SAC3C,CAAC;KACH;CACF,CAAC,CAAC;AAEH,IAAI,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE;IACnC,aAAa,CAAC,eAAe,CAC3B,IAAI,6BAA6B,CAAC;QAChC,QAAQ,EAAE,IAAI,kBAAkB,EAAE;QAClC,oBAAoB,EAClB,MAAC,OAAO,CAAC,GAAG,CAAC,2BAAiD,mCAAI,KAAK;KAC1E,CAAC,CACH,CAAC;CACH;AACD,OAAO,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC;AAE9C,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAE1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CACrD,wBAAwB,EACxB;IACE,WAAW,EAAE,wBAAwB;IACrC,SAAS,EAAE,SAAS,CAAC,GAAG;CACzB,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC,eAAe,CACzD,0BAA0B,EAC1B;IACE,WAAW,EAAE,yDAAyD;IACtE,SAAS,EAAE,SAAS,CAAC,GAAG;IACxB,IAAI,EAAE,IAAI;CACX,CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netwerk-digitaal-erfgoed/network-of-terms-query",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@comunica/bindings-factory": "^2.7.0",
|
|
33
33
|
"@comunica/data-factory": "^2.7.0",
|
|
34
|
-
"@comunica/query-sparql": "^2.8.
|
|
34
|
+
"@comunica/query-sparql": "^2.8.1",
|
|
35
35
|
"@hapi/hoek": "^11.0.2",
|
|
36
36
|
"@opentelemetry/api": "^1.4.1",
|
|
37
37
|
"@opentelemetry/exporter-metrics-otlp-proto": "0.40.0",
|
|
38
|
-
"@opentelemetry/resources": "1.
|
|
38
|
+
"@opentelemetry/resources": "1.15.0",
|
|
39
39
|
"@opentelemetry/sdk-metrics": "1.14.0",
|
|
40
40
|
"@opentelemetry/semantic-conventions": "1.14.0",
|
|
41
41
|
"@rdfjs/data-model": "^2.0.1",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@comunica/core": "^2.7.0",
|
|
51
|
-
"@comunica/query-sparql-file": "^2.8.
|
|
51
|
+
"@comunica/query-sparql-file": "^2.8.1",
|
|
52
52
|
"@jest/globals": "^29.4.3",
|
|
53
53
|
"asynciterator": "^3.8.1",
|
|
54
54
|
"jest-dev-server": "9.0.0",
|