{"record":{"id":"4f45d04b68610acf","repo":"argoproj/argo-workflows","slug":"internal-error-creating-metric-instrument-of-unkno","errorCode":null,"errorMessage":"internal error creating metric instrument of unknown type %v","messagePattern":"internal error creating metric instrument of unknown type (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"util/telemetry/instrument.go","lineNumber":128,"sourceCode":"\t\t)\n\t\tinstPtr = &inst\n\t\terr = insterr\n\tcase Int64UpDownCounter:\n\t\tinst, insterr := (*m.otelMeter).Int64UpDownCounter(name,\n\t\t\tmetric.WithDescription(desc),\n\t\t\tmetric.WithUnit(unit),\n\t\t)\n\t\tinstPtr = &inst\n\t\terr = insterr\n\tcase Int64Counter:\n\t\tinst, insterr := (*m.otelMeter).Int64Counter(name,\n\t\t\tmetric.WithDescription(desc),\n\t\t\tmetric.WithUnit(unit),\n\t\t)\n\t\tinstPtr = &inst\n\t\terr = insterr\n\tdefault:\n\t\treturn fmt.Errorf(\"internal error creating metric instrument of unknown type %v\", instType)\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\tm.AddInstrument(name, &Instrument{\n\t\tname:        name,\n\t\tdescription: desc,\n\t\totel:        instPtr,\n\t})\n\treturn nil\n}\n\nfunc (m *Metrics) buckets(name string, defaultBuckets []float64) []float64 {\n\tif opts, ok := m.config.Modifiers[name]; ok {\n\t\tif len(opts.HistogramBuckets) > 0 {\n\t\t\tbuckets := opts.HistogramBuckets\n\t\t\tsort.Float64s(buckets)\n\t\t\treturn buckets","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/util/telemetry/instrument.go#L110-L146","documentation":"CreateInstrument's switch on instrument type fell through to default: an instrument was requested with an otel instrument kind this build does not know how to create. Barring version skew, this is an internal programming error — the enum is closed and all cases should be handled.","triggerScenarios":"Thrown at util/telemetry/instrument.go:128 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the InstrumentType passed matches a supported otel instrument kind","Update argo-workflows if a stale binary is mixed with newer instrumentation code"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}