Skip to content

Commit ed1d5a7

Browse files
authored
Add service.name and event.dataset to spec (#32)
1 parent 95e0aa6 commit ed1d5a7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

spec/spec.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,32 @@
5050
"required": false,
5151
"url": "https://www.elastic.co/guide/en/ecs/current/ecs-tracing.html",
5252
"comment": "When APM agents add this field to the context, ecs loggers should pick it up and add it to the log event."
53+
},
54+
"service.name": {
55+
"type": "string",
56+
"required": false,
57+
"url": "https://www.elastic.co/guide/en/ecs/current/ecs-service.html",
58+
"comment": [
59+
"Configurable by users.",
60+
"When an APM agent is active, they should auto-configure it if not already set."
61+
]
62+
},
63+
"event.dataset": {
64+
"type": "string",
65+
"required": false,
66+
"url": "https://www.elastic.co/guide/en/ecs/current/ecs-event.html",
67+
"default": "${service.name}.log OR ${service.name}.${appender.name}",
68+
"comment": [
69+
"Configurable by users.",
70+
"If the user manually configures the service name,",
71+
"the logging library should set `event.dataset=${service.name}.log` if not explicitly configured otherwise.",
72+
"",
73+
"When agents auto-configure the app to use an ECS logger,",
74+
"they should set `event.dataset=${service.name}.${appender.name}` if the appender name is available in the logging library.",
75+
"Otherwise, agents should also set `event.dataset=${service.name}.log`",
76+
"",
77+
"The field helps to filter for different log streams from the same pod, for example and is required for log anomaly detection."
78+
]
5379
}
5480
}
5581
}

0 commit comments

Comments
 (0)