- fix: Use
req.originalUrl
, if available, when convertingreq
to ECS fields. This is necessary because Express will mutate req.url during routing. (#114)
-
Bump the
ecs.version
from "1.6.0" to "8.10.0". (#133) -
formatHttpRequest()
will now attempt to determine request ID and add it to thehttp.request.id
field. This first attemptsreq.id
(Fastify, express-request-id),req.id()
(Restify), and then falls back to therequest-id
orx-request-id
headers. (#76)Note: In previous versions a
req.id
value would be added to theevent.id
field. This has been removed. Please open an issue if this impacts you.
- [Breaking change.] Drop the
serialize
method. Serialization will move to the individual@elastic/ecs-*-format
libraries -- and they will be switching to thesafe-stable-stringify
package.
- Fix
formatHttpRequest
andformatHttpResponse
to be more defensive. If the given request or response object, respectively, is not one they know how to process (for example if a user logs areq
orres
field that is not a Node.js http request or response object), then processing is skipped. The functions now return true if the given object could be processed, false otherwise.formatError
was similarly changed to return true/false for whether the givenerr
could be processed.
- Change
formatHttpRequest
andformatHttpResponse
to no longer exclude the "content-length" and "user-agent" headers for "http.request.headers" and "http.response.headers", even though their info also rendered to other specialized fields. - Update ECS version to "1.6.0". Relevant ECS changes:
- "span.id" - This field is included by the loggers when integrating with APM.
- "Deprecate guidance to lowercase http.request.method."
Now when using
formatHttpRequest
the "http.request.method" field will no longer be lowercased.
- Fix possible crash in
formatHttpRequest
ifreq.socket
is not available. (#17) - Add support for the hapi request object being passed to
formatHttpRequest
andformatHttpResponse
. - Fix the setting of the remote IP and port
ECS client fields:
client.address
,client.ip
,client.port
. This also supports using Express'sreq.ip
.
- Add
formatError
for adding ECS Error fields for a givenError
object. (#42)
- Add service.name
and event.dataset
to the
stringify()
spec, according to the ecs-logging spec. These fields are automatically added by ECS loggers when APM is enabled.
- Add ECS Tracing fields
to
stringify()
schema.
- Change
stringify()
to serialize "log.level" as a top-level dotted field per elastic/ecs-logging#33. (#27)
- Fix
url.full
field - #16
- Export ECS version - #12
Initial release.