Prometheus not compatible with tinygo?
Author: f0oCreated Aug 23, 2023Updated Sep 29, 2026
Labelsenhancementnetwork
Possibly related to https://github.com/tinygo-org/tinygo/issues/3705 ?
# github.com/prometheus/client_golang/prometheus/internal
../../../../go/pkg/mod/github.com/prometheus/[email protected]/prometheus/internal/go_runtime_metrics.go:42:27: d.Name undefined (type *metrics.Description has no field or method Name)
../../../../go/pkg/mod/github.com/prometheus/[email protected]/prometheus/internal/go_runtime_metrics.go:65:7: d.Cumulative undefined (type *metrics.Description has no field or method Cumulative)
../../../../go/pkg/mod/github.com/prometheus/[email protected]/prometheus/internal/go_runtime_metrics.go:65:23: d.Kind undefined (type *metrics.Description has no field or method Kind)
../../../../go/pkg/mod/github.com/prometheus/[email protected]/prometheus/internal/go_runtime_metrics.go:65:39: undefined: metrics.KindFloat64Histogram
../../../../go/pkg/mod/github.com/prometheus/[email protected]/prometheus/internal/go_runtime_metrics.go:70:11: d.Kind undefined (type *metrics.Description has no field or method Kind)
../../../../go/pkg/mod/github.com/prometheus/[email protected]/prometheus/internal/go_runtime_metrics.go:71:15: undefined: metrics.KindUint64
../../../../go/pkg/mod/github.com/prometheus/[email protected]/prometheus/internal/go_runtime_metrics.go:72:15: undefined: metrics.KindFloat64
../../../../go/pkg/mod/github.com/prometheus/[email protected]/prometheus/internal/go_runtime_metrics.go:73:15: undefined: metrics.KindFloat64HistogramI'm not even sure where to start looking on this one; I cleared the modcache and let tinygo download the modules fresh but the error is a bit generic.
It works fine on Go 1.19+
Source: tinygo-org/tinygo