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

ref: Expose configurable stack parser #4902

Merged
merged 23 commits into from Apr 12, 2022

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Apr 8, 2022

Adds a stackParser option to Options:

  /**
   * A stack parser implementation or an array of stack line parsers
   * By default, a stack parser is supplied for all supported browsers
   */
  stackParser?: StackParser | StackLineParser[];

Whenever we want access to a StackParser to use with the functions in eventbuilder we call stackParserFromOptions(options). This converts StackLineParser[] to StackParser and saves it back in the options so this conversion only occurs once.

Added Exports

@sentry/node

  • nodeStackParser

@sentry/browser

  • chromeStackParser
  • geckoStackParser
  • opera10StackParser
  • opera11StackParser
  • winjsStackParser
  • defaultStackParsers

AbhiPrasad and others added 16 commits April 7, 2022 13:32
Removes all references to `@sentry/apm`, a deprecated package we do not use anymore.
Removes the deprecated `API` class.
…ry#4849)

Remove deprecated methods `startSpan` and `child`.

These deprecated methods were removed in favour of `span.startChild`.
Removes `getActiveDomain` function and corresponding type.
The `user` dsn component was renamed to `publicKey`. This PR removes that from the dsn field.
Increases the creation timeout of `MongoMemoryServer` to temporarily fix Node integration test flakiness
This PR removes the previously deprecated `frameContextLines` from `NodeOptions`.
…4887)

These exports were historically used in `@sentry/electron`, but are no longer being used by the Electron SDK or the React Native SDK, so they can be removed.
@timfish timfish marked this pull request as ready for review April 8, 2022 13:00
@timfish timfish mentioned this pull request Apr 8, 2022
15 tasks
@AbhiPrasad
Copy link
Member

We'll do this for node as well right?

@timfish timfish force-pushed the v7/configurable-stack-parser branch from 318e093 to 0988600 Compare April 8, 2022 15:51
@AbhiPrasad AbhiPrasad changed the title ref(browser): Expose configurable stack parser ref: Expose configurable stack parser Apr 8, 2022
@AbhiPrasad
Copy link
Member

I'm gonna hold off on this as we are prepping our first alpha: #4892

Let's get this in alongside the decision about event.stacktrace in the next alpha!

@smeubank smeubank added this to the 7.0.0 milestone Apr 11, 2022
@AbhiPrasad
Copy link
Member

@timfish let's wait until we get the backend deletion changes merged in first, it'll minimize merge conflicts and maybe make things cleaner here.

@AbhiPrasad
Copy link
Member

Deleting the backend (#4919) merged in, I think we can rebase on top of that and make changes as appropriate. Sorry for the rebase trouble!

@timfish
Copy link
Collaborator Author

timfish commented Apr 12, 2022

Sorry for the rebase trouble!

No trouble at all!

All rebased and fixed and ready to review. Do you think this approach is still good after the backend delete?

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

My only qualm with this approach is:

Whenever we want access to a StackParser to use with the functions in eventbuilder we call stackParserFromOptions(options). This converts StackLineParser[] to StackParser and saves it back in the options so this conversion only occurs once.

I think we want to move toward a world where we have two sets of options, the top level init one's and the internal client options. This also means the top level init options becomes immutable, which I think fits user mental models better.

Let's think about that after this PR gets merged in though! I'm going to start work on default integrations, so I can take a look at the options more holistically.

@AbhiPrasad AbhiPrasad merged commit f3e9384 into getsentry:7.x Apr 12, 2022
lobsterkatie pushed a commit that referenced this pull request Apr 13, 2022
Adds a `stackParser` option to `Options`:

```ts
  /**
   * A stack parser implementation or an array of stack line parsers
   * By default, a stack parser is supplied for all supported browsers
   */
  stackParser?: StackParser | StackLineParser[];
```

Whenever we want access to a `StackParser` to use with the functions in `eventbuilder` we call `stackParserFromOptions(options)`. This converts `StackLineParser[]` to `StackParser` and saves it back in the options so this conversion only occurs once.

### Added Exports
`@sentry/node` 
- `nodeStackParser`

`@sentry/browser` 
- `chromeStackParser`
- `geckoStackParser`
- `opera10StackParser`
- `opera11StackParser`
- `winjsStackParser`
- `defaultStackParsers`
Lms24 pushed a commit that referenced this pull request Apr 26, 2022
Adds a `stackParser` option to `Options`:

```ts
  /**
   * A stack parser implementation or an array of stack line parsers
   * By default, a stack parser is supplied for all supported browsers
   */
  stackParser?: StackParser | StackLineParser[];
```

Whenever we want access to a `StackParser` to use with the functions in `eventbuilder` we call `stackParserFromOptions(options)`. This converts `StackLineParser[]` to `StackParser` and saves it back in the options so this conversion only occurs once.

### Added Exports
`@sentry/node` 
- `nodeStackParser`

`@sentry/browser` 
- `chromeStackParser`
- `geckoStackParser`
- `opera10StackParser`
- `opera11StackParser`
- `winjsStackParser`
- `defaultStackParsers`
lobsterkatie pushed a commit that referenced this pull request Apr 26, 2022
Adds a `stackParser` option to `Options`:

```ts
  /**
   * A stack parser implementation or an array of stack line parsers
   * By default, a stack parser is supplied for all supported browsers
   */
  stackParser?: StackParser | StackLineParser[];
```

Whenever we want access to a `StackParser` to use with the functions in `eventbuilder` we call `stackParserFromOptions(options)`. This converts `StackLineParser[]` to `StackParser` and saves it back in the options so this conversion only occurs once.

### Added Exports
`@sentry/node`
- `nodeStackParser`

`@sentry/browser`
- `chromeStackParser`
- `geckoStackParser`
- `opera10StackParser`
- `opera11StackParser`
- `winjsStackParser`
- `defaultStackParsers`
lobsterkatie pushed a commit that referenced this pull request Apr 26, 2022
Adds a `stackParser` option to `Options`:

```ts
  /**
   * A stack parser implementation or an array of stack line parsers
   * By default, a stack parser is supplied for all supported browsers
   */
  stackParser?: StackParser | StackLineParser[];
```

Whenever we want access to a `StackParser` to use with the functions in `eventbuilder` we call `stackParserFromOptions(options)`. This converts `StackLineParser[]` to `StackParser` and saves it back in the options so this conversion only occurs once.

### Added Exports
`@sentry/node`
- `nodeStackParser`

`@sentry/browser`
- `chromeStackParser`
- `geckoStackParser`
- `opera10StackParser`
- `opera11StackParser`
- `winjsStackParser`
- `defaultStackParsers`
@timfish timfish deleted the v7/configurable-stack-parser branch May 19, 2022 13:14
AbhiPrasad pushed a commit that referenced this pull request May 30, 2022
Adds a `stackParser` option to `Options`:

```ts
  /**
   * A stack parser implementation or an array of stack line parsers
   * By default, a stack parser is supplied for all supported browsers
   */
  stackParser?: StackParser | StackLineParser[];
```

Whenever we want access to a `StackParser` to use with the functions in `eventbuilder` we call `stackParserFromOptions(options)`. This converts `StackLineParser[]` to `StackParser` and saves it back in the options so this conversion only occurs once.

### Added Exports
`@sentry/node`
- `nodeStackParser`

`@sentry/browser`
- `chromeStackParser`
- `geckoStackParser`
- `opera10StackParser`
- `opera11StackParser`
- `winjsStackParser`
- `defaultStackParsers`
Lms24 added a commit that referenced this pull request Aug 1, 2022
…edErrors (#5497)

Bring back a definedness check for `self._handler` in the global event processor of the LinkedErrors integration for Node. 
The check was removed in #4902 but apparently it is still necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants