{"record":{"id":"59d0a724db2bc8e1","repo":"microsoft/aspire","slug":"unknown-metric-point-type-point-pointtype","errorCode":null,"errorMessage":"Unknown metric point type '{point.PointType}'.","messagePattern":"Unknown metric point type '(.+?)'\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/Aspire.Dashboard/Otlp/Storage/SqliteTelemetryRepository.Metrics.Reads.cs","lineNumber":248,"sourceCode":"                dimensionQueryRangesCteSql,\n                queryParameters,\n                dataPointInterval,\n                pointRecords,\n                populateExemplarAttributes)\n            : Array.Empty<KeyValuePair<long, MetricsExemplar>>().ToLookup(pair => pair.Key, pair => pair.Value);\n\n        for (var dimensionIndex = 0; dimensionIndex < dimensions.Count; dimensionIndex++)\n        {\n            var dimensionId = dimensions[dimensionIndex].DimensionId;\n            var dimension = results[dimensionIndex];\n            foreach (var point in points[dimensionId])\n            {\n                MetricValueBase value = point.PointType switch\n                {\n                    LongPointType => new MetricValue<long>(point.IntegerValue!.Value, new DateTime(point.StartTimeTicks, DateTimeKind.Utc), new DateTime(point.EndTimeTicks, DateTimeKind.Utc)),\n                    DoublePointType => new MetricValue<double>(point.DoubleValue!.Value, new DateTime(point.StartTimeTicks, DateTimeKind.Utc), new DateTime(point.EndTimeTicks, DateTimeKind.Utc)),\n                    HistogramPointType => CreateHistogramValue(point),\n                    _ => throw new InvalidOperationException($\"Unknown metric point type '{point.PointType}'.\")\n                };\n                if (point.PointType != HistogramPointType)\n                {\n                    value.Count = checked((ulong)point.RepeatCount);\n                }\n                value.Exemplars.AddRange(exemplars[point.PointId]);\n                dimension.Values.Add(value);\n            }\n        }\n        return results;\n    }\n\n    private List<StoredMetricDimension> GetMetricDimensions(\n        SqliteConnection connection,\n        IReadOnlyList<CachedInstrument> instruments,\n        IReadOnlyDictionary<string, IReadOnlyList<string?>> dimensionFilters,\n        Dictionary<string, List<string?>> knownAttributeValues,\n        out bool hasOverflow)","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Dashboard/Otlp/Storage/SqliteTelemetryRepository.Metrics.Reads.cs#L230-L266","documentation":"Metric points are stored with a discriminator (point.PointType) that is one of LongPointType, DoublePointType, or HistogramPointType. MaterializeMetricDimensions switches on that discriminator and throws InvalidOperationException when a stored point has a type value it does not recognize, indicating data or constants out of sync.","triggerScenarios":"A row read from the metric points table has a PointType not matching any of the three known constants (e.g. corrupted rows, stale rows from a newer schema version, or a new point type added upstream without updating this switch).","commonSituations":"Dashboard opened against telemetry storage written by a newer/newer-preview dashboard version; database file reused across version upgrades; manually edited or partially migrated SQLite data.","solutions":["Point the dashboard at storage created by the same (or older, compatible) version; clear/reset old telemetry storage after upgrading.","Locate which PointType value is present in the data and confirm whether a new type needs handling in the switch.","Restore a consistent dashboard + storage version pair.","If reproducible, file an issue with the PointType value observed."],"exampleFix":"// before: reusing a database from a newer dashboard build\ndashboard --data-dir /shared/telemetry-from-v9\n// after: use fresh or matching-version storage\ndashboard --data-dir /home/user/.aspire/dashboard-v10-telemetry","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    var points = await repo.GetMetricsAsync(query);\n}\ncatch (InvalidOperationException ex) when (ex.Message.StartsWith(\"Unknown metric point type\"))\n{\n    logger.LogError(ex, \"Telemetry storage written by an incompatible version; clearing store.\");\n    ResetTelemetryStore();\n}","preventionTips":["Use a dashboard data directory written by the same version.","Don't share SQLite telemetry files across dashboard versions.","Reset storage after major upgrades."],"tags":["metrics","storage","schema-mismatch"],"backgroundTag":"internal-invariant-violation","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T09:17:21.228Z"}