From 62f85b1d3781660e80df1c19c6da77d6c8d54fe1 Mon Sep 17 00:00:00 2001 From: Harshit Rajput <31892897+harshitrjpt@users.noreply.github.com> Date: Wed, 13 Mar 2024 16:25:16 +0530 Subject: [PATCH] include description and unit from melt metric --- platform/melt/exporter.go | 4 +++- platform/melt/types.go | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/melt/exporter.go b/platform/melt/exporter.go index ea67eb27..4782f304 100644 --- a/platform/melt/exporter.go +++ b/platform/melt/exporter.go @@ -269,7 +269,9 @@ func (exp *Exporter) buildSpansPayload(entities []*Entity) *collspans.ExportTrac func (exp *Exporter) createOtelMetric(m *Metric) *metrics.Metric { otm := &metrics.Metric{ - Name: m.TypeName, + Name: m.TypeName, + Description: m.Description, + Unit: m.Unit, } switch m.ContentType { diff --git a/platform/melt/types.go b/platform/melt/types.go index eecc87fc..cc2fa536 100644 --- a/platform/melt/types.go +++ b/platform/melt/types.go @@ -58,6 +58,7 @@ type Entity struct { // Metric - structs for metrics type Metric struct { TypeName string + Description string ContentType string Unit string Type string