feat(logging): enhance HTTP request logging with additional payload details
- Introduced new fields in the HttpPageFetchLog model to capture request and response headers, bodies, and method for improved logging granularity. - Updated the logging service to serialize and store these new details during HTTP fetch operations, enhancing traceability and debugging capabilities. - Modified the clickTtHttpPageRoutes to include the new logging features, allowing for optional payload inclusion in log queries.
This commit is contained in:
@@ -48,6 +48,21 @@ const HttpPageFetchLog = sequelize.define('HttpPageFetchLog', {
|
||||
allowNull: true,
|
||||
comment: 'Club-ID falls clubInfoDisplay',
|
||||
},
|
||||
requestMethod: {
|
||||
type: DataTypes.STRING(16),
|
||||
allowNull: true,
|
||||
comment: 'HTTP-Methode des ausgehenden Requests',
|
||||
},
|
||||
requestHeaders: {
|
||||
type: DataTypes.TEXT('long'),
|
||||
allowNull: true,
|
||||
comment: 'Gesendete Request-Header als JSON',
|
||||
},
|
||||
requestBody: {
|
||||
type: DataTypes.TEXT('long'),
|
||||
allowNull: true,
|
||||
comment: 'Gesendeter Request-Body im Originalformat',
|
||||
},
|
||||
httpStatus: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
@@ -58,7 +73,7 @@ const HttpPageFetchLog = sequelize.define('HttpPageFetchLog', {
|
||||
defaultValue: false,
|
||||
},
|
||||
responseSnippet: {
|
||||
type: DataTypes.TEXT,
|
||||
type: DataTypes.TEXT('long'),
|
||||
allowNull: true,
|
||||
comment: 'Gekürzter Response-Anfang zur Strukturanalyse',
|
||||
},
|
||||
@@ -66,6 +81,21 @@ const HttpPageFetchLog = sequelize.define('HttpPageFetchLog', {
|
||||
type: DataTypes.STRING(128),
|
||||
allowNull: true,
|
||||
},
|
||||
responseHeaders: {
|
||||
type: DataTypes.TEXT('long'),
|
||||
allowNull: true,
|
||||
comment: 'Empfangene Response-Header als JSON',
|
||||
},
|
||||
responseBody: {
|
||||
type: DataTypes.TEXT('long'),
|
||||
allowNull: true,
|
||||
comment: 'Vollstaendiger Response-Body',
|
||||
},
|
||||
responseUrl: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
comment: 'Finale Response-URL nach Redirects',
|
||||
},
|
||||
errorMessage: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
|
||||
Reference in New Issue
Block a user