Skip to content

Add tags to detailed error response

Sean Arnold requested to merge 119031-add-tags-to-sentry-error-api-rest into master

What does this MR do?

This adds the tags attribute to the detailed response of an error.

We build the tags from various attributes we receive from the Sentry response.

This related to #119031 (closed) and #36246 (closed).

New example response:

{
  "error": {
    "count": "1",
    "culprit": "",
    "external_base_url": "https://sentry.io/gitlab-03/gitlab-03",
    "external_url": "https://sentry.io/gitlab-03/gitlab-03/issues/1381947161",
    "first_release_last_commit": null,
    "first_release_short_version": "94f8627",
    "first_seen": "2019-12-11T01:53:07Z",
    "frequency": [
      [
        1576634400,
        0
      ],
      [
        1576638000,
        0
      ],
      [
        1576641600,
        0
      ],
      [
        1576645200,
        0
      ],
      [
        1576648800,
        0
      ],
      [
        1576652400,
        0
      ],
      [
        1576656000,
        0
      ],
      [
        1576659600,
        0
      ],
      [
        1576663200,
        0
      ],
      [
        1576666800,
        0
      ],
      [
        1576670400,
        0
      ],
      [
        1576674000,
        0
      ],
      [
        1576677600,
        0
      ],
      [
        1576681200,
        0
      ],
      [
        1576684800,
        0
      ],
      [
        1576688400,
        0
      ],
      [
        1576692000,
        0
      ],
      [
        1576695600,
        0
      ],
      [
        1576699200,
        0
      ],
      [
        1576702800,
        0
      ],
      [
        1576706400,
        0
      ],
      [
        1576710000,
        0
      ],
      [
        1576713600,
        0
      ],
      [
        1576717200,
        0
      ],
      [
        1576720800,
        0
      ]
    ],
    "gitlab_issue": null,
    "id": "1381947161",
    "last_release_last_commit": null,
    "last_release_short_version": "94f8627",
    "last_seen": "2019-12-11T01:53:07Z",
    "message": "Felipe Pouros",
    "project_id": "1788822",
    "project_name": "gitlab-03",
    "project_slug": "gitlab-03",
    "short_id": "GITLAB-03-3T",
    "status": "unresolved",
    "tags": {
      "level": "error",
      "logger": "ruby"
    },
    "title": "StandardError: Felipe Pouros",
    "type": "error",
    "user_count": 0
  }
}

Does this MR meet the acceptance criteria?

Conformity

Related to #119031 (closed)

Merge request reports

Loading