@corva/ui 3.77.0-21 → 3.77.0-22

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.
@@ -2,8 +2,8 @@
2
2
  import 'dotenv/config';
3
3
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
4
4
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
5
+ import { OTLPMetricExporter, AggregationTemporalityPreference } from '@opentelemetry/exporter-metrics-otlp-http';
5
6
  import { MeterProvider, PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics';
6
- import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-http';
7
7
  import { SpanKind, SpanStatusCode, propagation, context } from '@opentelemetry/api';
8
8
  import { NodeTracerProvider, TraceIdRatioBasedSampler, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-node';
9
9
  import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
@@ -246,9 +246,9 @@ const validateDsn = dsn => {
246
246
  return url.href;
247
247
  };
248
248
 
249
- const MCP_SERVER_VERSION = '1.5.0';
249
+ const MCP_SERVER_VERSION = '1.5.1';
250
250
 
251
- var version = "3.77.0-21";
251
+ var version = "3.77.0-22";
252
252
 
253
253
  const CORVA_UI_VERSION = version;
254
254
 
@@ -369,15 +369,24 @@ const createMetricsClient = meter => {
369
369
  };
370
370
  };
371
371
 
372
+ // Uptrace drops the first point of every cumulative series, and each process is a new series,
373
+ // so with the SDK's cumulative default the first export of every counter was lost (AI-340).
374
+ // Set in code, not via OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE, so the environment
375
+ // cannot switch it back. Trade-off: a delta export lost after retries is not repaired by the next one.
376
+ const createMetricExporter = config => new OTLPMetricExporter({
377
+ url: OTLP_METRICS_ENDPOINT,
378
+ headers: {
379
+ 'uptrace-dsn': config.dsn
380
+ },
381
+ timeoutMillis: OTLP_EXPORTER_TIMEOUT_MS,
382
+ temporalityPreference: AggregationTemporalityPreference.DELTA
383
+ });
384
+
372
385
  const createMeterProvider = config => new MeterProvider({
373
386
  resource: config.resource,
374
387
  readers: [new PeriodicExportingMetricReader({
375
- exporter: new OTLPMetricExporter({
376
- url: OTLP_METRICS_ENDPOINT,
377
- headers: {
378
- 'uptrace-dsn': config.dsn
379
- },
380
- timeoutMillis: OTLP_EXPORTER_TIMEOUT_MS
388
+ exporter: createMetricExporter({
389
+ dsn: config.dsn
381
390
  }),
382
391
  exportIntervalMillis: METRICS_EXPORT_INTERVAL_MS,
383
392
  exportTimeoutMillis: METRICS_EXPORT_TIMEOUT_MS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "3.77.0-21",
3
+ "version": "3.77.0-22",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Shared components/utils for Corva ui projects",
6
6
  "repository": {