- Fix types -- "index.d.ts" had not been included in the published package. (by @imusvesh in #170)
-
Switch to
safe-stable-stringify
for JSON serialization. This library protects against circular references and bigints. (#155) -
Set
http.request.id
field (see ecs-helpers CHANGELOG). -
Changed to a named export. The preferred way to import is now:
const { ecsFormat } = require('@elastic/ecs-morgan-format'); // CommonJS import { ecsFormat } from '@elastic/ecs-morgan-format'; // ESM
The old way will be deprecated and removed in the future:
const ecsFormat = require('@elastic/ecs-morgan-format'); // OLD
-
Add support for default import in TypeScript, with or without the
esModuleInterop
setting:import ecsFormat from '@elastic/ecs-pino-format';
However, note that using named imports is now preferred.
-
Add
service.version
,service.environment
, andservice.node.name
log correlation fields, automatically inferred from an active APM agent. As well, the followingecsFormat
configuration options have been added for overriding these and existing correlation fields:serviceName
,serviceVersion
,serviceEnvironment
,serviceNodeName
. (elastic/apm-agent-nodejs#3195, #121, #87) -
Change to adding dotted field names (
"ecs.version": "1.6.0"
), rather than namespaced fields ("ecs": {"version": "1.6.0"}
) for most fields. This is supported by the ecs-logging spec, and arguably preferred in the ECS logging docs. It is also what the ecs-logging-java libraries do. The resulting output is slightly shorter, and accidental collisions with user fields is less likely. -
Stop adding ".log" suffix to
event.dataset
field. (#95)
-
Update @elastic/[email protected] to get more robust HTTP req and res formatting.
-
Add
apmIntegration: false
option to all ecs-logging formatters to enable explicitly disabling Elastic APM integration. (#62) -
Fix "elasticApm.isStarted is not a function" crash on startup. (#60)
-
Update to @elastic/[email protected]: ecs.version is now "1.6.0", http.request.method is no longer lower-cased, improvements to HTTP serialization.
-
Set "service.name" and "event.dataset" log fields if Elastic APM is started. This helps to filter for different log streams in the same pod and the latter is required for log anomaly detection. (#41)
-
Add support for ECS tracing fields. If it is detected that Elastic APM is in use and there is an active trace, then tracing fields will be added to log records. This enables linking between traces and log records in Kibana. (#35)
-
Fix passing of a format name, e.g.
app.use(morgan(ecsFormat('tiny')))
.
- Serialize "log.level" as a top-level dotted field per elastic/ecs-logging#33. #23
- Use the version number provided by ecs-helpers - #13
Initial release.