@@ -205,6 +205,7 @@ func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) Collector {
205205 // to fail here. This condition is tested in TestExpectedRuntimeMetrics.
206206 continue
207207 }
208+ help := attachOriginalName (d .Description .Description , d .Name )
208209
209210 sampleBuf = append (sampleBuf , metrics.Sample {Name : d .Name })
210211 sampleMap [d .Name ] = & sampleBuf [len (sampleBuf )- 1 ]
@@ -216,7 +217,7 @@ func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) Collector {
216217 m = newBatchHistogram (
217218 NewDesc (
218219 BuildFQName (namespace , subsystem , name ),
219- d . Description . Description ,
220+ help ,
220221 nil ,
221222 nil ,
222223 ),
@@ -228,15 +229,15 @@ func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) Collector {
228229 Namespace : namespace ,
229230 Subsystem : subsystem ,
230231 Name : name ,
231- Help : d . Description . Description ,
232+ Help : help ,
232233 },
233234 )
234235 } else {
235236 m = NewGauge (GaugeOpts {
236237 Namespace : namespace ,
237238 Subsystem : subsystem ,
238239 Name : name ,
239- Help : d . Description . Description ,
240+ Help : help ,
240241 })
241242 }
242243 metricSet = append (metricSet , m )
@@ -286,6 +287,10 @@ func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) Collector {
286287 }
287288}
288289
290+ func attachOriginalName (desc , origName string ) string {
291+ return fmt .Sprintf ("%s Sourced from %s" , desc , origName )
292+ }
293+
289294// Describe returns all descriptions of the collector.
290295func (c * goCollector ) Describe (ch chan <- * Desc ) {
291296 c .base .Describe (ch )
0 commit comments