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

feat(protocol): Add scraping_attempts field #2575

Merged
merged 8 commits into from
Oct 9, 2023

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Oct 6, 2023

getsentry/sentry#57461 introduced a new top-level field on the event that is only written by sentry. To prevent errors when the event passes through normalization after writing scraping_attempts, make sure that the new field is part of the schema known by (lib)relay.

@jjbayer jjbayer marked this pull request as ready for review October 6, 2023 11:39
@jjbayer jjbayer requested review from a team, loewenheim and lforst October 6, 2023 11:39
@jjbayer jjbayer requested a review from loewenheim October 6, 2023 12:42
@jjbayer jjbayer enabled auto-merge (squash) October 9, 2023 07:27
/// Information about attempts to scrape a JS source or sourcemap file from the web.
/// This field is populated by sentry.
#[metastructure(omit_from_schema)] // not part of external schema
pub scraping_attempts: Annotated<Array<Value>>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make this a Value instead of Array instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is a good call. Then Relay dies not even have to be updated if the sentry-side schema ever changed to an object to include more metadata, for example. Updated now.

@jjbayer jjbayer merged commit 60a34ec into master Oct 9, 2023
20 checks passed
@jjbayer jjbayer deleted the feat/event-scraping-attempts branch October 9, 2023 11:11
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.

4 participants