SigNoz/signoz · error

error getting updated metrics metadata: %s

Error message

error getting updated metrics metadata: %s

What it means

In the metric metadata assembly path, the reader calls GetUpdatedMetricsMetadata to fetch metadata for the listed metric names; that call returned an ApiError which is wrapped into this message. The inner error text explains whether it was a ClickHouse exec failure, scan failure, or something else, so the %s is the diagnostic payload.

Source

Thrown at pkg/query-service/app/clickhouseReader/reader.go:3009

	for rows.Next() {
		var name string
		if err := rows.Scan(&name); err != nil {
			return nil, fmt.Errorf("error while scanning metric name: %s", err.Error())
		}
		if skipSignozMetrics && strings.HasPrefix(name, "signoz") {
			continue
		}
		metricNames = append(metricNames, name)
	}

	if len(metricNames) == 0 {
		return &response, nil
	}

	// Get all metadata in one shot
	metadataMap, apiError := r.GetUpdatedMetricsMetadata(ctx, orgID, metricNames...)
	if apiError != nil {
		return &response, fmt.Errorf("error getting updated metrics metadata: %s", apiError.Error())
	}

	seen := make(map[string]struct{})
	for _, name := range metricNames {
		metadata := metadataMap[name]

		typ := string(metadata.MetricType)
		temporality := string(metadata.Temporality)
		isMonotonic := metadata.IsMonotonic

		// Non-monotonic cumulative sums are treated as gauges
		if typ == "Sum" && !isMonotonic && temporality == string(v3.Cumulative) {
			typ = "Gauge"
		}

		// unlike traces/logs `tag`/`resource` type, the `Type` will be metric type
		key := v3.AttributeKey{
			Key:      name,

View on GitHub (pinned to 5069bf80b0)

Solutions

  1. Unwrap and read the inner apiError.Error() text — it identifies the real failing stage
  2. Ensure signoz_metrics metadata tables exist (run migrations) and ClickHouse is healthy
  3. Retry after restoring ClickHouse; metadata queries are read-only and safe to retry
  4. Reduce the metricNames batch if the query times out on very large metric cardinality
Defensive patterns

Strategy: try-catch

Try / catch

// unwrap inner ApiError and branch on its Typ for retry vs 404 vs 500
if err != nil {
  if strings.Contains(err.Error(), "UNKNOWN_TABLE") { return &response, nil }
  return nil, err
}

Prevention

When it happens

Trigger: Listing metrics (with metadata) when the metadata query against signoz_metrics_metadata fails: table missing, ClickHouse down, or a scan/type error inside GetUpdatedMetricsMetadata for one of the requested names.

Common situations: Metadata table not yet created on fresh installs; interrupted migrations; intermittent ClickHouse unavailability during metrics explorer usage.

Related errors


AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28). Data as JSON: /api/errors/296f009a0971e5c2. Report an issue: GitHub.