Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send events to GitLab's error-tracking backend #577

Closed
Fnux opened this issue Jul 31, 2023 · 6 comments
Closed

Unable to send events to GitLab's error-tracking backend #577

Fnux opened this issue Jul 31, 2023 · 6 comments

Comments

@Fnux
Copy link

Fnux commented Jul 31, 2023

Environment

I am using the recently released sentry-elixir 8.1.0.

Steps to Reproduce

  1. Create a project on gitlab.com
  2. Enable error-tracking as perhttps://docs.gitlab.com/ee/operations/error_tracking.html
  3. Execute mix sentry.send_test_event.

Expected Result

The event to be send / received on the gitlab side.

Actual Result

The endpoint is linked to a dummy gitlab project: https://gitlab.com/Fnux/sentry-demo

I (gitlab-error-tracking|✚1) ~/W/i/inilab » mix sentry.send_test_event
Client configuration:
server: https://observe.gitlab.com:443/errortracking/api/v1/projects/api/48125950/envelope/
public_key: glet_0df14ed816ce0031c66b296fe5fa15bb
secret_key: 
included_environments: [:prod, :dev]
current environment_name: :dev
hackney_opts: []

Sending test event...

09:41:51.669 [warning] Failed to send Sentry event. Error in HTTP Request to Sentry - {:error, %Jason.DecodeError{position: 0, token: nil, data: ""}}
Error sending event: {:request_failure, {:error, %Jason.DecodeError{position: 0, token: nil, data: ""}}}

I would gladly provide any extra information and write write a patch if needed, but don't have the bandwidth to investigate right now.

@whatyouhide
Copy link
Collaborator

@Fnux hey, thanks for the issue!

First question: did this work before 8.1.0?

@Fnux
Copy link
Author

Fnux commented Jul 31, 2023

No, it didn't. I tried 1-2 weeks ago by checkout out the master branch (since the previous stable release did not work wit gitlab's DSN format), but it didn't work either. I waited for the 8.1 release before investigating further / opening this issue.

@whatyouhide
Copy link
Collaborator

Ah, perfect, okay. Follow up (possibly dumb) question... Did it ever work at any point? 😄

@whatyouhide whatyouhide changed the title Unable to send events to gitlab's error-tracking backend Unable to send events to GitLab's error-tracking backend Jul 31, 2023
@Fnux
Copy link
Author

Fnux commented Jul 31, 2023

I never saw it working myself, but I believe it worked at some point since folks have explicitly patched sentry-elixir to support gitlab's DSN format: #506

@whatyouhide
Copy link
Collaborator

I think this is an issue with Sentry envelopes, which were introduced with Sentry Relay. We use envelopes everywhere now, and these envelopes are encoded as multiple JSON objects separated by newlines. So, this is not gonna work unless GitLab updates their side of things.

Supporting both envelopes as well as the old format is a big undertaking to do in this SDK, so I would recommend using a version prior to 8.1.0 if GitLab doesn't update their side of things.

Thanks for reporting! 💟

@whatyouhide whatyouhide closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2023
@Fnux
Copy link
Author

Fnux commented Oct 5, 2023

Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants