public class ECS extends Object
Documentation of each variables can be found on link: https://www.elastic.co/guide/en/ecs/current/ecs-base.html
This class can be used for various purpose by following ECS format
- generating exceptions JSON format (in this case message should not be set) - generating log JSON format (in this case error should not be set) - ...
Error example based on ELASTIC APM Server: https://github.com/elastic/apm-server/blob/master/docs/data/elasticsearch/generated/errors.json
Mapping example based on ELASTIC APM Server: https://github.com/elastic/apm-server/blob/master/docs/spec/errors/error.json
Modifier and Type | Method and Description |
---|---|
String |
currentTimestamp() |
void |
error(ECSError error) |
ECSError |
errorJson() |
ISettingsMap |
host() |
ISettingsMap |
labels() |
void |
labels(ISettingsMap labels) |
String |
logMessage() |
void |
message(String message) |
PunchMeta |
punchMeta() |
ISettingsMap |
service() |
void |
service(ISettingsMap service) |
String[] |
tags()
NOTE it is possible to set tags through environment variable.
|
ISettingsMap |
userDefinedKeyValues() |
void |
userDefinedKeyValues(ISettingsMap userDefinedKeyValues) |
ECSVersion |
version() |
public ECS(PunchMeta punchMeta)
public void error(ECSError error)
public void labels(ISettingsMap labels)
public void service(ISettingsMap service)
public void userDefinedKeyValues(ISettingsMap userDefinedKeyValues)
public void message(String message)
public ECSError errorJson()
public ECSVersion version()
public String currentTimestamp()
public PunchMeta punchMeta()
public String logMessage()
public String[] tags()
Any environment variables that has for prefix: PUNCHPLATFORM_TAGS will be displayed within the tags key.
public ISettingsMap labels()
public ISettingsMap service()
public ISettingsMap host()
public ISettingsMap userDefinedKeyValues()
Copyright © 2014–2022. All rights reserved.