Skip to content

Commit 0e98201

Browse files
Update the taint from event.module to is_remapped (#30)
* Update the taint * Update remappers/internal/metric.go Co-authored-by: Felix Barnsteiner <[email protected]> * Update remappers/hostmetrics/hostmetrics_test.go Co-authored-by: Felix Barnsteiner <[email protected]> * Update the k8smetrcis test --------- Co-authored-by: Felix Barnsteiner <[email protected]>
1 parent c8fcaba commit 0e98201

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

remappers/common/const.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,4 @@ package common
2020
const (
2121
// DatastreamDatasetLabel defines a dataset label for attributes.
2222
DatastreamDatasetLabel = "data_stream.dataset"
23-
24-
// RemapperEventModule defines the value of the ECS attribute
25-
// `event.module` that will be added to all the remapped metrics.
26-
RemapperEventModule = "elastic/opentelemetry-lib"
2723
)

remappers/hostmetrics/hostmetrics_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func doTestRemap(t *testing.T, id string, remapOpts ...Option) {
5555

5656
systemIntegration := newConfig(remapOpts...).SystemIntegrationDataset
5757
outAttr := func(scraper string) map[string]any {
58-
m := map[string]any{"event.module": "elastic/opentelemetry-lib"}
58+
m := map[string]any{"otel_remapped": true}
5959
if systemIntegration {
6060
m[common.DatastreamDatasetLabel] = scraperToElasticDataset[scraper]
6161
}

remappers/internal/metric.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func AddMetrics(
6868
dp.SetStartTimestamp(metric.StartTimestamp)
6969
}
7070

71-
dp.Attributes().PutStr("event.module", common.RemapperEventModule)
71+
dp.Attributes().PutBool("otel_remapped", true)
7272
if dataset != "" {
7373
dp.Attributes().PutStr(common.DatastreamDatasetLabel, dataset)
7474
}

remappers/kubernetesmetrics/k8smetrics_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func doTestRemap(t *testing.T, id string, remapOpts ...Option) {
5050

5151
kubernetesIntegration := newConfig(remapOpts...).KubernetesIntegrationDataset
5252
outAttr := func(scraper string) map[string]any {
53-
m := map[string]any{"event.module": "elastic/opentelemetry-lib"}
53+
m := map[string]any{"otel_remapped": true}
5454
m["service.type"] = "kubernetes"
5555
if kubernetesIntegration {
5656
m[common.DatastreamDatasetLabel] = scraperToElasticDataset[scraper]

0 commit comments

Comments
 (0)