{"record":{"id":"500cabd06cb3b5a5","repo":"SigNoz/signoz","slug":"metric-metadata-not-found-s","errorCode":null,"errorMessage":"metric metadata not found: %s","messagePattern":"metric metadata not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":404,"severity":"warning","filePath":"pkg/query-service/app/clickhouseReader/reader.go","lineNumber":3256,"sourceCode":"\tmetadataMap, apiError := r.GetUpdatedMetricsMetadata(ctx, orgID, metricName)\n\tif apiError != nil {\n\t\tr.logger.Error(\"Error in getting metric cached metadata\", errorsV2.Attr(apiError))\n\t\treturn nil, fmt.Errorf(\"error fetching metric metadata: %s\", apiError.Err.Error())\n\t}\n\n\t// Defaults in case metadata is not found\n\tvar (\n\t\tdeltaExists bool\n\t\tisMonotonic bool\n\t\ttemporality string\n\t\tdescription string\n\t\tmetricType  string\n\t\tunit        string\n\t)\n\n\tmetadata, ok := metadataMap[metricName]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"metric metadata not found: %s\", metricName)\n\t}\n\n\tmetricType = string(metadata.MetricType)\n\ttemporality = string(metadata.Temporality)\n\tisMonotonic = metadata.IsMonotonic\n\tdescription = metadata.Description\n\tunit = metadata.Unit\n\n\tif temporality == string(v3.Delta) {\n\t\tdeltaExists = true\n\t}\n\t// 2. Only for Histograms, get `le` buckets\n\tvar leFloat64 []float64\n\tif metricType == string(v3.MetricTypeHistogram) {\n\t\treductionEnabled := r.fl.BooleanOrEmpty(ctx, flagger.FeatureEnableMetricsReduction, featuretypes.NewFlaggerEvaluationContext(orgID))\n\n\t\tvar query string\n\t\tif reductionEnabled {","sourceCodeStart":3238,"sourceCodeEnd":3274,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/query-service/app/clickhouseReader/reader.go#L3238-L3274","documentation":"Returned when the requested metric name has no entry in the resolved metadata map, i.e. SigNoz has no recorded type/temporality/unit for that metric. This is a plain lookup miss after GetUpdatedMetricsMetadata succeeded, so it indicates unknown or not-yet-indexed metric names rather than an infrastructure failure.","triggerScenarios":"Querying histogram buckets or similar metadata-dependent endpoints for a metric name that was never ingested, is misspelled, or was ingested so recently that the metadata cache/job hasn't picked it up.","commonSituations":"Typos in dashboard/widget metric names; querying immediately after a new metric is first emitted (metadata updater runs periodically); metrics from deleted/renamed instruments; environment mismatch (querying prod metric name in dev).","solutions":["Verify the exact metric name spelling, including dots/underscores and case","Confirm the metric exists: SELECT DISTINCT metric_name FROM signoz_metrics.time_series","Wait for the metadata refresh interval and retry if the metric was just created","If metadata is persistently missing, check the metrics metadata updater job / signoz_metrics_metadata table"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"names, err := fetchMetricNames(ctx)\nif !slices.Contains(names, metricName) {\n    return fmt.Errorf(\"unknown metric %q\", metricName)\n}","typeGuard":null,"tryCatchPattern":"if err != nil {\n    if strings.Contains(err.Error(), \"metric metadata not found\") {\n        // surface friendly message, suggest available metrics\n    }\n}","preventionTips":["Validate metric names against the ingested list before calling","Wait one metadata refresh cycle after first ingest","Use dropdowns populated from /metrics instead of free-text"],"tags":["signoz","metrics","metadata","not-found"],"backgroundTag":"metric-metadata-not-found","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}