Skip to content

Add Support for addition Sentry Fields (Users, Request Data, Environment, Release) - #40

Open
cycomachead wants to merge 22 commits into
cloudflare:masterfrom
snap-cloud:master
Open

cycomachead wants to merge 22 commits into
cloudflare:masterfrom
snap-cloud:master

Conversation

@cycomachead

Copy link
Copy Markdown

Sorry this is one big PR. I've been meaning to try to upstream some changes for a while. If there's interest, consider this the start of a conversation — I can try to break this up as necessary.

Essentially, I've been using raven-lua pretty successfully in a Lapis (OpenResty) project. I've needed to extend this to support a few additional fields more common in traditional user-facing web apps.

  • Adds environment as a static property to the event payload, passed in during initialization
  • addsserver_name. Can be passed in or defined with get_server_name
  • adds release. Same deal as above. :)
  • Allows user and contexts tables to be passed to send_report
  • Now includes a default version of get_request_data which was contributed to my fork by danifbento
  • Also fixes a small typo. :)

@DDevine

DDevine commented Aug 25, 2021

Copy link
Copy Markdown

It isn't that big of a merge... And it looks good to me.

danifbento and others added 2 commits September 25, 2021 20:41
It was added upstream information which can be used when available.
Add more information into ngx raven sender.
@nevmerzhitsky

Copy link
Copy Markdown
Contributor

Why it wasn't merged, guys? :'(

@nevmerzhitsky

Copy link
Copy Markdown
Contributor

@jdesgats consider merge of this, please

Sentry `release` should be `nil` when not set
@amo13

amo13 commented Sep 2, 2023

Copy link
Copy Markdown

Please merge

cycomachead and others added 3 commits October 26, 2026 22:03
…on/fingerprint

`raven.parse_traceback(trace, opts)` turns a `debug.traceback` string into
Sentry stacktrace frames, with optional filename prefix stripping and an
`in_app` classifier. `captureException` now keeps a `stacktrace` the caller
already set instead of replacing it with the live stack, and the report
conf accepts `culprit`, `transaction` and `fingerprint`.

This lets an error handler that only receives the original traceback as a
string (Lapis `handle_error`) report the real frames rather than its own.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
parse_traceback helper, caller-supplied stacktraces, transaction/fingerprint conf
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.

5 participants