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

SentryJobErrorReportingClient: set event platform from parsed stacktrace #16906

Merged
merged 11 commits into from
Sep 26, 2022

Conversation

pedroslopez
Copy link
Contributor

@pedroslopez pedroslopez commented Sep 19, 2022

What

Set sentry's platform on events for better display and so we can use it to determine who should be paged.

From the Sentry docs https://develop.sentry.dev/sdk/event-payloads/#required-attributes:

Acceptable values are: as3, c, cfml, cocoa, csharp, elixir, haskell, go, groovy, java, javascript, native, node, objc, other, perl, php, python, ruby

So dbt errors will still be sent as other

close https://github.com/airbytehq/airbyte-cloud/issues/2650

How

  • Return a new SentryParsedException class from the exception parser that includes the platform.
  • Use the SentryParsedException's platform to set it on the event and add a tag

@github-actions github-actions bot added area/platform issues related to the platform area/scheduler labels Sep 19, 2022
@pedroslopez pedroslopez temporarily deployed to more-secrets September 19, 2022 22:19 Inactive
Comment on lines 28 to 29
public static final String ERROR_MAP_MESSAGE_KEY = "errorMessage";
public static final String ERROR_MAP_TYPE_KEY = "errorType";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was not being used

@pedroslopez pedroslopez marked this pull request as ready for review September 19, 2022 22:24
@pedroslopez pedroslopez changed the title set sentry event platform from parsed stacktrace [SentryErrorReportingClient] set event platform from parsed stacktrace Sep 19, 2022
@pedroslopez pedroslopez changed the title [SentryErrorReportingClient] set event platform from parsed stacktrace [SentryJobErrorReportingClient] set event platform from parsed stacktrace Sep 19, 2022
@pedroslopez pedroslopez changed the title [SentryJobErrorReportingClient] set event platform from parsed stacktrace SentryJobErrorReportingClient: set event platform from parsed stacktrace Sep 19, 2022
@pedroslopez pedroslopez temporarily deployed to more-secrets September 19, 2022 22:38 Inactive
@pedroslopez pedroslopez temporarily deployed to more-secrets September 19, 2022 23:14 Inactive
@@ -23,10 +23,9 @@
@SuppressWarnings("PMD.AvoidLiteralsInIfCondition")
public class SentryExceptionHelper {

private static final Logger LOGGER = LoggerFactory.getLogger(SentryExceptionHelper.class);
public record SentryParsedException(String platform, List<SentryException> exceptions) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe an enum of the platforms is more appropriate here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍🏻 done in 85cbf67

@github-actions github-actions bot removed the area/platform issues related to the platform label Sep 26, 2022
@pedroslopez pedroslopez temporarily deployed to more-secrets September 26, 2022 16:18 Inactive
@pedroslopez pedroslopez temporarily deployed to more-secrets September 26, 2022 16:23 Inactive
@github-actions github-actions bot added the area/platform issues related to the platform label Sep 26, 2022
@pedroslopez pedroslopez temporarily deployed to more-secrets September 26, 2022 16:29 Inactive
@pedroslopez pedroslopez temporarily deployed to more-secrets September 26, 2022 16:34 Inactive
@github-actions github-actions bot added the area/worker Related to worker label Sep 26, 2022
@pedroslopez pedroslopez temporarily deployed to more-secrets September 26, 2022 16:38 Inactive
@github-actions github-actions bot removed the area/worker Related to worker label Sep 26, 2022
@pedroslopez pedroslopez temporarily deployed to more-secrets September 26, 2022 16:41 Inactive
@pedroslopez pedroslopez temporarily deployed to more-secrets September 26, 2022 17:07 Inactive
@pedroslopez pedroslopez temporarily deployed to more-secrets September 26, 2022 18:16 Inactive
@pedroslopez pedroslopez merged commit 8c63133 into master Sep 26, 2022
@pedroslopez pedroslopez deleted the pedroslopez/sentry-platform branch September 26, 2022 20:49
robbinhan pushed a commit to robbinhan/airbyte that referenced this pull request Sep 29, 2022
…ace (airbytehq#16906)

* set sentry event platform from parsed stacktrace

* fix pmd

* use an enum

* use enum in test

* fix imports

* fix imports

* format

* fix imports
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
…ace (airbytehq#16906)

* set sentry event platform from parsed stacktrace

* fix pmd

* use an enum

* use enum in test

* fix imports

* fix imports

* format

* fix imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/scheduler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants