diff --git a/remappers/common/const.go b/remappers/common/const.go index 749f4f2..9b88079 100644 --- a/remappers/common/const.go +++ b/remappers/common/const.go @@ -24,6 +24,9 @@ const ( // EventDatasetLabel defines the event dataset label key. EventDatasetLabel = "event.dataset" + // EventModuleLabel defines the event module label key. + EventModuleLabel = "event.module" + // OTelRemappedLabel is used to identify remapped metrics. OTelRemappedLabel = "otel_remapped" ) diff --git a/remappers/hostmetrics/hostmetrics.go b/remappers/hostmetrics/hostmetrics.go index b3e99b3..29c4f4a 100644 --- a/remappers/hostmetrics/hostmetrics.go +++ b/remappers/hostmetrics/hostmetrics.go @@ -95,6 +95,7 @@ func (r *Remapper) Remap( } datasetMutator := func(m pmetric.NumberDataPoint) { m.Attributes().PutStr(common.EventDatasetLabel, dataset) + m.Attributes().PutStr(common.EventModuleLabel, "system") if r.cfg.SystemIntegrationDataset { m.Attributes().PutStr(common.DatastreamDatasetLabel, dataset) } diff --git a/remappers/hostmetrics/hostmetrics_test.go b/remappers/hostmetrics/hostmetrics_test.go index abcc68b..2a97755 100644 --- a/remappers/hostmetrics/hostmetrics_test.go +++ b/remappers/hostmetrics/hostmetrics_test.go @@ -64,6 +64,7 @@ func doTestRemap(t *testing.T, id string, remapOpts ...Option) { m := map[string]any{ common.OTelRemappedLabel: true, common.EventDatasetLabel: dataset, + common.EventModuleLabel: "system", } if systemIntegration { m[common.DatastreamDatasetLabel] = dataset