Skip to content

Document other options for capture_message/capture_exceptionΒ #763

@PragTob

Description

@PragTob

πŸ‘‹ Thanks for sentry,

right now both capure_message/2 and capture_exception/2 claim the following:

The opts argument is passed as the second argument to send_event/2.

This leaves you relatively confused as send_event/2 supports relatively few options.

For instance the README itself uses Sentry.capture_exception(my_exception, stacktrace: __STACKTRACE__) which isn't documented in there.

Some digging in the code reveals that the opts are split between client and event opts, the latter of which end up at some form of Event.create_event/1.

This includes some params I'd consider essential:

  • stacktrace
  • level
  • extra

These are hard to find now from the README & docs (at least I have completely missed them without digging into the code).

I think it'd be nice to either point people to the doc for the other function, or since it seems rather internal, document these options in another public facing common place so they're easier to find and adjust :)

I'm not PRing it, as I'm not sure where this should best live :)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions