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

Added support for Sentry events from JavaScript SDKs #73

Merged
merged 2 commits into from
Sep 17, 2023
Merged

Conversation

butschster
Copy link
Member

This PR introduces support for Sentry events that originate from JavaScript SDKs. With this enhancement, developers can easily send events straight from their JavaScript applications to Buggregator, making it even more versatile and comprehensive in capturing application errors.

Highlights:

Direct integration using Sentry's JavaScript SDK.

Just set it up in your app like this:

import * as Sentry from "@sentry/browser";

Sentry.init({
  dsn: "http:https://[email protected]:8000/1",
  // other configurations...
});

Alternate Configuration using Buggregator's Loader Script.

Add this script to your website:

<script src="http:https://127.0.0.1:8082/api/sentry/1.js" crossorigin="anonymous"></script>

When you include the script in your website, the part 1.js represents the project ID. You can replace it with any project ID you like. So if your project ID was something unique like bdea41c41c273f86a4f1b0dd8, the link becomes:

http:https://127.0.0.1:8082/api/sentry/bdea41c41c273f86a4f1b0dd8.js

For this method, remember to configure the SENTRY_DSN_HOST environment variable in the docker container as shown:

services:
    # ...
    buggregator:
       image: ghcr.io/buggregator/server:dev
       environment:
              SENTRY_DSN_HOST: http:https://[email protected]:8000

SENTRY_DSN_HOST is an essential setting used by Buggregator to generate the correct address inside the script that your JavaScript app will use to send error reports.

Benefits

  • Provides an extended range for error reporting, allowing developers to capture errors from both PHP and JavaScript environments.
  • Offers seamless integration options, making it easy to onboard and implement.

Your feedback and suggestions are highly welcomed. Let's make debugging JavaScript apps even more efficient with Buggregator!

- Adds Sentry events handler from JS SDK
- Adds HTTP action for getting JS Loader Script
@butschster butschster added enhancement New feature or request module [Sentry] labels Sep 17, 2023
@butschster butschster added this to the 1.0 milestone Sep 17, 2023
@butschster butschster linked an issue Sep 17, 2023 that may be closed by this pull request
@butschster butschster self-assigned this Sep 17, 2023
@butschster butschster mentioned this pull request Sep 17, 2023
@butschster butschster merged commit b645a61 into master Sep 17, 2023
@butschster butschster deleted the feature/72 branch September 17, 2023 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module [Sentry]
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support Sentry events from JavaScript SDKs
1 participant