getsentry / sentry-docs

Sentry's documentation (and tools to build it)
https://docs.sentry.io
Other
324 stars 1.38k forks source link

Documentation says send-event can use a json-formatted file, but does not specify what format it should be in #9538

Open bbugh opened 3 months ago

bbugh commented 3 months ago

👋 This is a documentation issue, which you don't have a template for. Apologies if this isn't in an optimal format.

Issue

In this section of the documentation

https://docs.sentry.io/product/cli/send-event/#stored-events

It says

As of version 1.71, the send-event command can accept an optional argument that specifies a path to the stored JSON representation of an event. When used, it will load the file, validate the event and send it to Sentry.

However, there is no link or references to what a "stored JSON representation" is.

By digging into the source code and finding a test fixture I was able to find an example representation.

However, looking through the docs (and some Sentry experience) I see that this doesn't represent any data format that I know of. It kind of looks like what you'd send with a breadcrumb, but breadcrumbs are type, category, message, level, timestamp and data, but this fixture has different keys:

breadcrumb fixture
category
data
dist
environment
event_id
level level
message message
release
timestamp
type

Exploring further, I'm guessing from this integration test that the keys might be the same as the command line arguments that can be passed in to send-event, and using sentry-cli send-event --help shows many of the same flags, but there's a difference that event.json uses environment key, but the command line flag is env.

That implies to me that one of those is a typo, or that this still isn't the correct JSON schema.

Expected Result

There is more information about what the "JSON representation of an event" means.

Thank you for reading!

szokeasaurusrex commented 3 months ago

Thanks for reporting! I am transferring this issue to our documentation repository

getsantry[bot] commented 3 months ago

Assigning to @getsentry/support for routing ⏲️

clemsos commented 1 month ago

hello, any update on this?

getsantry[bot] commented 4 weeks ago

Routing to @getsentry/product-owners-sdks-web-backend for triage ⏲️

szokeasaurusrex commented 1 week ago

Apologies and thanks for your patience, it seems this issue fell through the cracks!

The file that you pass to send-event needs to be a valid JSON file. The file can contain any of the attributes documented here.

We will update the send-events docs page to include this information