File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
modules/ingest-ecs/src/main/java/org/elasticsearch/ingest/ecs Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 2121import java .util .Map ;
2222import java .util .Set ;
2323
24+ import static java .util .Map .entry ;
25+
2426/**
2527 * This processor is responsible for transforming non-OpenTelemetry-compliant documents into a namespaced flavor of ECS
2628 * that makes them compatible with OpenTelemetry.
@@ -43,15 +45,11 @@ public class EcsNamespaceProcessor extends AbstractProcessor {
4345 /**
4446 * Mapping of ECS field names to their corresponding OpenTelemetry-compatible counterparts.
4547 */
46- private static final Map <String , String > RENAME_KEYS = Map .of (
47- "span.id" ,
48- "span_id" ,
49- "message" ,
50- "body.text" ,
51- "log.level" ,
52- "severity_text" ,
53- "trace.id" ,
54- "trace_id"
48+ private static final Map <String , String > RENAME_KEYS = Map .ofEntries (
49+ entry ("span.id" , "span_id" ),
50+ entry ("message" , "body.text" ),
51+ entry ("log.level" , "severity_text" ),
52+ entry ("trace.id" , "trace_id" )
5553 );
5654
5755 /**
You can’t perform that action at this time.
0 commit comments