Integrated error tracking Angular 400 error

Summary

Using the angular sentry library to send a request to the GitLab sentry backend (Integrated error tracking) results in a 400 error

Steps to reproduce

  1. Implement the SDK:
Sentry.init({
  dsn: "https://KEY_HERE@observe.gitlab.com:443/errortracking/api/v1/projects/PROJECT_ID",
  environment: `example`,
  enabled: true,
  release: packageInfo.version
});
  1. Get an error
  2. Observe 400 error

Example Project

What is the current bug behavior?

A 400 error is returned from observe.gitlab.com

What is the expected correct behavior?

The request is a success

Relevant logs and/or screenshots

Request URL: https://observe.gitlab.com/errortracking/api/v1/projects/api/ID/envelope/?sentry_key=KEY_HERE&sentry_version=7&sentry_client=sentry.javascript.angular%2F7.31.0
Request Method: POST
Status Code: 400
Response Headers
        access-control-allow-headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
        access-control-allow-methods: PUT, GET, POST, OPTIONS, DELETE
        access-control-allow-origin: *
        access-control-max-age: 1728000
        cf-cache-status: DYNAMIC
        cf-ray: 78b8286a688f21a5-DUS
        content-length: 0
        date: Wed, 18 Jan 2023 14:53:02 GMT
        server: cloudflare
        strict-transport-security: max-age=15724800; includeSubDomains
Request Headers
        accept: */*
        accept-encoding: gzip, deflate, br
        accept-language: en-GB,en-US;q=0.9,en;q=0.8,de;q=0.7
        content-length: 470
        content-type: text/plain;charset=UTF-8
        origin: http://localhost:4200
        referer: http://localhost:4200/
        sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108"
        sec-ch-ua-mobile: ?0
        sec-ch-ua-platform: "macOS"
        sec-fetch-dest: empty
        sec-fetch-mode: cors
        sec-fetch-site: cross-site
        user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes