Skip to content

Commit

Permalink
Replace mapping.omit_attributes_prefix: true with mapping.mode: raw
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Jan 17, 2024
1 parent 0139e75 commit d7b8b4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
3 changes: 0 additions & 3 deletions exporter/elasticsearchexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ type MappingsSettings struct {
Dedup bool `mapstructure:"dedup"`

Dedot bool `mapstructure:"dedot"`

// Omit "Attributes." prefix on fields.
OmitAttributesPrefix bool `mapstructure:"omit_attributes_prefix"`
}

type MappingMode int
Expand Down
14 changes: 6 additions & 8 deletions exporter/elasticsearchexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ func TestLoadConfig(t *testing.T) {
MaxInterval: 1 * time.Minute,
},
Mapping: MappingsSettings{
Mode: "ecs",
Dedup: true,
Dedot: true,
OmitAttributesPrefix: false,
Mode: "ecs",
Dedup: true,
Dedot: true,
},
LogstashFormat: LogstashFormatSettings{
Enabled: false,
Expand Down Expand Up @@ -185,10 +184,9 @@ func TestLoadConfig(t *testing.T) {
MaxInterval: 1 * time.Minute,
},
Mapping: MappingsSettings{
Mode: "ecs",
Dedup: true,
Dedot: true,
OmitAttributesPrefix: true,
Mode: "raw",
Dedup: true,
Dedot: true,
},
LogstashFormat: LogstashFormatSettings{
Enabled: false,
Expand Down
2 changes: 1 addition & 1 deletion exporter/elasticsearchexporter/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ elasticsearch/log:
sending_queue:
enabled: true
mapping:
omit_attributes_prefix: true
mode: raw
elasticsearch/logstash_format:
endpoints: [http://localhost:9200]
logstash_format:
Expand Down

0 comments on commit d7b8b4e

Please sign in to comment.