Commit 209eb95e authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'jira-sync-log-cardinality' into 'master'

Serialize JIRA response to avoid field explosion in logs

See merge request gitlab-org/gitlab!31910
parents f2699a17 09bd3a10
...@@ -22,10 +22,11 @@ module JiraConnect ...@@ -22,10 +22,11 @@ module JiraConnect
def log_response(response) def log_response(response)
message = { message = {
message: 'response from jira dev_info api',
integration: 'JiraConnect', integration: 'JiraConnect',
project_id: project.id, project_id: project.id,
project_path: project.full_path, project_path: project.full_path,
response: response jira_response: response&.to_json
} }
if response && response['errorMessages'] if response && response['errorMessages']
......
...@@ -31,10 +31,11 @@ describe JiraConnect::SyncService do ...@@ -31,10 +31,11 @@ describe JiraConnect::SyncService do
def expect_log(type, message) def expect_log(type, message)
expect(Gitlab::ProjectServiceLogger) expect(Gitlab::ProjectServiceLogger)
.to receive(type).with( .to receive(type).with(
message: 'response from jira dev_info api',
integration: 'JiraConnect', integration: 'JiraConnect',
project_id: project.id, project_id: project.id,
project_path: project.full_path, project_path: project.full_path,
response: message jira_response: message&.to_json
) )
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment