Logging y auditoría

Logging y auditoría

Request log fields and how they connect API activity to company credentials.

Request log fields and how they connect API activity to company credentials.

Campos persistidos

FieldDescription
methodHTTP method.
pathOriginal URL with query string.
normalizedPathPath without query string.
statusCodeFinal HTTP status.
durationMsRequest duration in milliseconds.
profileIdResolved Developer Profile (internal Mongo id, kept for relations and audit).
profileCodeResolved Developer Profile code (dp_ prefix) sent in X-Travelandz-Id.
profileKeyPublic key used by the request.
credentialIdEmbedded credential/API key _id; preferred key for API-key audit views.
companyIdAssociated company.
ipExpress-resolved IP; depends on TRUST_PROXY.
originHostname from Origin or Referer.
userAgentUser agent.
gdsproviderProvider inferred from the path when applicable.
errorCodeStructured error code when present in the response.
errorMessageShort error message.
requestContentLengthRequest content length.
responseContentLengthResponse content length.

Credential traceability

Use credentialId for exact joins between dashboard credentials and logs. Use profileKey when the UI only has the public key, or when diagnosing historical records created before credential identifiers were surfaced.

Security

Logs must never include Authorization, bearer tokens, decrypted secret keys or raw third-party provider credentials.