Skip to content

Conversation

@gpene
Copy link
Contributor

@gpene gpene commented Jun 23, 2022

What does it do?

Documents the Sentry plugin within the Developer Documentation.

Why is it needed?

Strapi maintained plugin that is not documented.

Related issue(s)/PR(s)

#13

@gpene gpene self-assigned this Jun 23, 2022
@vercel
Copy link

vercel bot commented Jun 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
documentation ✅ Ready (Inspect) Visit Preview Jul 11, 2022 at 10:52AM (UTC)

@pwizla pwizla added source: Dev Docs PRs/issues targeting the Developer Docs internal PRs created by the Strapi core team pr: new content PRs for new product features or new documentation sections labels Jun 23, 2022
Copy link
Collaborator

@meganelacheny meganelacheny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, clean documentation! 👏

* Include additional metadata in Sentry events to assist in debugging
* Expose a [global Sentry service](#global-sentry-service)

## Installation
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The titles in this documentation don't have the same format as those in the Email plugin documentation @StrapiShaun is rewriting. Since you 2 are (re)writing 3 plugin docs at the same time (Sentry, Upload, Email) it would be nice to follow similar structures if possible and make the same choices in terms of titles format etc.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, should we use upper case or lower case for the bullet points here?
Include → include, etc.
We've been using lower-case versions in other places of the documentation, but maybe it should be uppercase in proper English? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StrapiShaun and I did discuss this, and don't believe there's enough similarity in the plugins that they can follow an identical template / format, so I don't think that's workable either here or for future plugin/provider docs.

@pwizla My vote is obviously for uppercase but happy to change it if the rest disagree?

Copy link
Collaborator

@pwizla pwizla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great and clean PR, Gabriel, thanks!

On top of Mégane's comments, I have a few more questions or suggestions (see dedicated comments), plus a general one:

This is something we started discussing with the GraphQL configuration Gustav documented the other day. Do you think we should keep plugins configurations in Setup & Deployment > Configurations > Optional > Plugins (like we did for GraphQL already) or should these configurations stay in the dedicated plugins documentation sections?

Since we'll probably add more plugins configurations, and while our team is rewriting Email & Upload docs, what do you all think about this? (cc @meganelacheny @StrapiShaun)

* Include additional metadata in Sentry events to assist in debugging
* Expose a [global Sentry service](#global-sentry-service)

## Installation
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, should we use upper case or lower case for the bullet points here?
Include → include, etc.
We've been using lower-case versions in other places of the documentation, but maybe it should be uppercase in proper English? 🤔


Create or edit your `./config/plugins.js` file to configure the Sentry plugin. The following properties are available:

| Property | Type | Default Value | Description |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To stay consistent with other documentation sections (for instance Configurations pages, but please feel free to highlight any inconsistency we might have anywhere else), I'd suggest we have these columns, in this specific order:
Parameter, Description, Type, Default (or "Default value" if you prefer).

Also, I think we capitalized types (e.g. Boolean, Integer) in other parts of the documentations. Though maybe we could change this. MDN usually uses capitalized type names, but what typeof returns in JavaScript is not capitalized (typeof true returns boolean for instance). 🤔


| Method | Description | Parameters |
| ------ | ----------- | ---------- |
| `sendError` | Manually send errors to Sentry. | <ul><li><code>error</code>: The error to be sent.</li><li><code>configureScope</code>: Optional. Enables you to customize the error event.</li></ul><br>See the official [Sentry documentation](https://docs.sentry.io/platforms/node/enriching-events/scopes/#configuring-the-scope) for more details. |
Copy link
Collaborator

@pwizla pwizla Jun 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personal preference here, but maybe it would a good idea to format the method names with parentheses just like when you call them (sendError(), getInstance()). This way, I think devs reading the table will instantly understand these are methods, not parameters or other configuration options.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, do you know if errors you can send with the Sentry plugin can/should follow the format described in Error handling, or is it something completely different?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a quick look at their docs I think you can pass just about anything you'd like captured as an event, you'll just be missing the stacktrace for any non-error objects passed.

@pwizla pwizla added this to the 4.2.3 milestone Jul 1, 2022
@gpene gpene marked this pull request as ready for review July 11, 2022 10:49
@gpene gpene changed the title [WIP]Adding Sentry plugin doc Adding Sentry plugin doc Jul 11, 2022
@pwizla
Copy link
Collaborator

pwizla commented Jul 13, 2022

As discussed with you, Closed in favor of #992, thank you, guys!

@pwizla pwizla closed this Jul 13, 2022
@pwizla pwizla deleted the dev/sentry-plugin branch September 30, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: new content PRs for new product features or new documentation sections source: Dev Docs PRs/issues targeting the Developer Docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants