func getDescription(data telemetry.MetricData) string {
	switch d := data.(type) {
	case *metric.Int64Data:
		return d.Info.Description
	case *metric.Float64Data:
		return d.Info.Description
	case *metric.HistogramInt64Data:
		return d.Info.Description
	case *metric.HistogramFloat64Data:
		return d.Info.Description
	}
	return ""
}
getDescription returns the description of data.
package ocagent
import (
	"fmt"
	"time"
	"github.com/fhs/acme-lsp/internal/golang_org_x_tools/telemetry"
	"github.com/fhs/acme-lsp/internal/golang_org_x_tools/telemetry/export/ocagent/wire"
	"github.com/fhs/acme-lsp/internal/golang_org_x_tools/telemetry/metric"
)
func dataToMetricDescriptor(data telemetry.MetricData) *wire.MetricDescriptor {
	if data == nil {
		return nil
	}
	descriptor := &wire.MetricDescriptor{
		Name:        data.Handle(),
		Description: getDescription(data),
		Type:      dataToMetricDescriptorType(data),
		LabelKeys: getLabelKeys(data),
	}
	return descriptor
}