-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(logs): initial work on develop docs for sdk logging api #12920
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
Merged
Merged
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
cc06312
feat(logs): intial work on develop docs for sdk logging api
AbhiPrasad a6a8091
feat: Document otel_log envelope
AbhiPrasad 20cfb44
ref: Clean up logs spec
AbhiPrasad ba6d2dd
fix link to logs pages
AbhiPrasad 7e4a0cb
Apply suggestions from code review
AbhiPrasad e5f87ea
Update develop-docs/sdk/telemetry/logs.mdx
AbhiPrasad cc48024
Update develop-docs/sdk/telemetry/logs.mdx
AbhiPrasad 0540762
fix: close code block
AbhiPrasad 07f741b
fix: Specify that intValue is a string
AbhiPrasad 60c3bdc
fix: Cursor got the change wrong
AbhiPrasad ff4f76e
Merge branch 'master' into abhi-logs-sdk-developer-documentation
AbhiPrasad 3ff6e56
Document log envelope item payload
AbhiPrasad 2d2abe8
enable_sentry_logs -> enable_logs
AbhiPrasad ab38e6e
note about overloading method
AbhiPrasad 5ea9d7d
remove log method
AbhiPrasad 9d7302b
remove emit
AbhiPrasad 6dc07e6
remove obj-c
AbhiPrasad 28cb4b5
add note about crashes
AbhiPrasad 824a186
Document rate limiting and client outcomes
AbhiPrasad 9a130c1
update spec based on attribute changes
AbhiPrasad 75ce009
Merge branch 'master' into abhi-logs-sdk-developer-documentation
AbhiPrasad 021d442
document sentry.origin log attribute
AbhiPrasad c35358a
Make sentry.message.parameter singular matching otel conventions
AbhiPrasad f8a5fda
clarify message parameter attribute and document sdk name/version att…
AbhiPrasad 77d0b95
feat: Document server.address
AbhiPrasad 5fa1be2
Merge branch 'master' into abhi-logs-sdk-developer-documentation
AbhiPrasad 4f667af
clarify sampling controls
AbhiPrasad 4ce5d4d
fix 404 link
AbhiPrasad b3f8c65
Add details about new log envelope item container
AbhiPrasad f5fc96f
move appendix into expandable
AbhiPrasad bc4f23f
Merge branch 'master' into abhi-logs-sdk-developer-documentation
AbhiPrasad 6251603
fix 404 to trace origin
AbhiPrasad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,13 +29,13 @@ encoded in JSON. | |
`event_id` | ||
|
||
: **UUID String, required.** Corresponds to the `event_id` field of the event | ||
payload. Clients are required to generate an event identifier ahead of time | ||
and set it at least in the Envelope headers. If the identifier mismatches | ||
between the Envelope and payload, the Envelope header takes precedence. | ||
payload. Clients are required to generate an event identifier ahead of time | ||
and set it at least in the Envelope headers. If the identifier mismatches | ||
between the Envelope and payload, the Envelope header takes precedence. | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Transaction | ||
|
||
|
@@ -52,14 +52,14 @@ in JSON. | |
`event_id` | ||
|
||
: **UUID String, required.** Corresponds to the `event_id` field of the | ||
transaction payload. Clients are required to generate an event identifier | ||
ahead of time and set it at least in the Envelope headers. If the identifier | ||
mismatches between the Envelope and payload, the Envelope header takes | ||
precedence. | ||
transaction payload. Clients are required to generate an event identifier | ||
ahead of time and set it at least in the Envelope headers. If the identifier | ||
mismatches between the Envelope and payload, the Envelope header takes | ||
precedence. | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Attachment | ||
|
||
|
@@ -91,27 +91,27 @@ file. It is always associated to an event or transaction. | |
|
||
`filename` | ||
|
||
: **String, required.** The name of the uploaded file without a path component. | ||
: **String, required.** The name of the uploaded file without a path component. | ||
|
||
`attachment_type` | ||
|
||
: *String, optional.* The special type of this attachment. Possible values are: | ||
: _String, optional._ The special type of this attachment. Possible values are: | ||
|
||
- **`event.attachment` (default)**: A standard attachment without special | ||
meaning. | ||
- `event.minidump`: A minidump file that creates an error event and is | ||
symbolicated. The file should start with the `MDMP` magic bytes. | ||
- `event.applecrashreport`: An Apple crash report file that creates an error | ||
event and is symbolicated. | ||
- `unreal.context`: An XML file containing UE4 crash meta data. During event | ||
ingestion, event contexts and extra fields are extracted from this file. | ||
- `unreal.logs`: A plain-text log file obtained from UE4 crashes. During | ||
event ingestion, the last logs are extracted into event breadcrumbs. | ||
- `event.view_hierarchy`: An JSON file with a predefined structure, see [RFC #33](https://github.com/getsentry/rfcs/blob/main/text/0033-view-hierarchy.md). | ||
- **`event.attachment` (default)**: A standard attachment without special | ||
meaning. | ||
- `event.minidump`: A minidump file that creates an error event and is | ||
symbolicated. The file should start with the `MDMP` magic bytes. | ||
- `event.applecrashreport`: An Apple crash report file that creates an error | ||
event and is symbolicated. | ||
- `unreal.context`: An XML file containing UE4 crash meta data. During event | ||
ingestion, event contexts and extra fields are extracted from this file. | ||
- `unreal.logs`: A plain-text log file obtained from UE4 crashes. During | ||
event ingestion, the last logs are extracted into event breadcrumbs. | ||
- `event.view_hierarchy`: An JSON file with a predefined structure, see [RFC #33](https://github.com/getsentry/rfcs/blob/main/text/0033-view-hierarchy.md). | ||
|
||
`content_type` | ||
|
||
: *String, optional.* The content type of the attachment payload. Any [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) may be used; the default is `application/octet-stream`. | ||
: _String, optional._ The content type of the attachment payload. Any [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) may be used; the default is `application/octet-stream`. | ||
|
||
### Session | ||
|
||
|
@@ -124,11 +124,11 @@ details. | |
**Constraints:** | ||
|
||
- This Item may occur multiple times per Envelope. | ||
- Ingestion may limit the maximum number of Items per Envelope, see *Ingestion*. | ||
- Ingestion may limit the maximum number of Items per Envelope, see _Ingestion_. | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Sessions | ||
|
||
|
@@ -140,11 +140,11 @@ details. | |
**Constraints:** | ||
|
||
- This Item may occur multiple times per Envelope. | ||
- Ingestion may limit the maximum number of Items per Envelope, see *Ingestion*. | ||
- Ingestion may limit the maximum number of Items per Envelope, see _Ingestion_. | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Statsd (deprecated) | ||
|
||
|
@@ -156,11 +156,11 @@ details. | |
**Constraints:** | ||
|
||
- This Item may occur multiple times per Envelope. | ||
- Ingestion may limit the maximum number of Items per Envelope, see *Ingestion*. | ||
- Ingestion may limit the maximum number of Items per Envelope, see _Ingestion_. | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Metric Meta (deprecated) | ||
|
||
|
@@ -173,17 +173,18 @@ details. | |
**Constraints:** | ||
|
||
- This Item may occur multiple times per Envelope. | ||
- Ingestion may limit the maximum number of Items per Envelope, see *Ingestion*. | ||
- Ingestion may limit the maximum number of Items per Envelope, see _Ingestion_. | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### User Feedback | ||
|
||
Item type `"feedback"`. This Item contains an [event payload](/sdk/data-model/event-payloads/) encoded in JSON, with an additional `feedback` context object. | ||
|
||
Example payload: | ||
|
||
```json | ||
{ | ||
"event_id": "9ec79c33ec9942ab8353589fcb2e04dc", | ||
|
@@ -197,7 +198,7 @@ Example payload: | |
"message": "I love session replay!", | ||
"url": "https://sentry.io/replays/", | ||
"associated_event_id": "32fd1995636d446385016e2747623e11", | ||
"replay_id":"82840977e85b4ed3bc27f7b5b25cec15" | ||
"replay_id": "82840977e85b4ed3bc27f7b5b25cec15" | ||
} | ||
} | ||
} | ||
|
@@ -215,26 +216,26 @@ feedback. The max length is **4096 characters**. | |
|
||
`contact_email` | ||
|
||
: *String, optional.* The email of the user who submitted the feedback. If excluded, Sentry attempts to fill this in with user context. Anonymous feedbacks (no name or email) are still accepted. | ||
: _String, optional._ The email of the user who submitted the feedback. If excluded, Sentry attempts to fill this in with user context. Anonymous feedbacks (no name or email) are still accepted. | ||
|
||
`name` | ||
|
||
: *String, optional.* The name of the user who submitted the feedback. If excluded, Sentry attempts to fill this in with user context. Anonymous feedbacks (no name or email) are still accepted. | ||
: _String, optional._ The name of the user who submitted the feedback. If excluded, Sentry attempts to fill this in with user context. Anonymous feedbacks (no name or email) are still accepted. | ||
|
||
`url` | ||
|
||
: *String, optional.* The URL of the webpage the user was on when submitting feedback. | ||
This may be used to search for or set alerts on feedback. | ||
: _String, optional._ The URL of the webpage the user was on when submitting feedback. | ||
This may be used to search for or set alerts on feedback. | ||
|
||
`associated_event_id` | ||
|
||
: *UUID String, optional.* The identifier of an error event in the same project. | ||
Use this to explicitly link a related error in the feedback UI. | ||
: _UUID String, optional._ The identifier of an error event in the same project. | ||
Use this to explicitly link a related error in the feedback UI. | ||
|
||
`replay_id` | ||
|
||
: *UUID String, optional.* The identifier of a related Session Replay in the same | ||
project. Sentry uses this ID to render a Replay clip in the feedback UI. | ||
: _UUID String, optional._ The identifier of a related Session Replay in the same | ||
project. Sentry uses this ID to render a Replay clip in the feedback UI. | ||
|
||
**Attaching Screenshots:** | ||
|
||
|
@@ -253,10 +254,10 @@ Envelope. | |
`event_id` | ||
|
||
: **UUID String, required.** Corresponds to the `event_id` field of the event | ||
payload. **It is not equal to the `associated_event_id`** field in the feedback | ||
context. Clients are required to generate an event identifier ahead of time | ||
and set it at least in the Envelope headers. If the identifier mismatches | ||
between the Envelope and payload, the Envelope header takes precedence. | ||
payload. **It is not equal to the `associated_event_id`** field in the feedback | ||
context. Clients are required to generate an event identifier ahead of time | ||
and set it at least in the Envelope headers. If the identifier mismatches | ||
between the Envelope and payload, the Envelope header takes precedence. | ||
|
||
### User Report - Deprecated | ||
|
||
|
@@ -265,6 +266,7 @@ Item type `"user_report"`. This is an older, deprecated way of submitting user f | |
This item works by associating user information and comments with an event. If both the item and its associated event are accepted, we convert it to a user feedback. | ||
|
||
The item contains a JSON payload like this: | ||
|
||
```json | ||
{"event_id":"9ec79c33ec9942ab8353589fcb2e04dc","email":"[email protected]","name":"John Me","comments":"It broke."}\n | ||
``` | ||
|
@@ -278,15 +280,15 @@ an error. | |
|
||
`email` | ||
|
||
: *String, recommended.* The email of the user. | ||
: _String, recommended._ The email of the user. | ||
|
||
`name` | ||
|
||
: *String, recommended.* The name of the user. | ||
: _String, recommended._ The name of the user. | ||
|
||
`comments` | ||
|
||
: *String, recommended.* Comments of the user about what happened. The max length is **4096 characters**. | ||
: _String, recommended._ Comments of the user about what happened. The max length is **4096 characters**. | ||
|
||
**Constraints:** | ||
|
||
|
@@ -303,12 +305,12 @@ an error. | |
`event_id` | ||
|
||
: **UUID String, required.** Corresponds to the `event_id` field of the payload. | ||
If the identifier mismatches between the Envelope and payload, the Envelope | ||
header takes precedence. | ||
If the identifier mismatches between the Envelope and payload, the Envelope | ||
header takes precedence. | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Client Report | ||
|
||
|
@@ -324,11 +326,11 @@ details. | |
|
||
**Envelope Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Replay Event | ||
|
||
|
@@ -344,15 +346,15 @@ details. | |
|
||
**Envelope Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Replay Recording | ||
|
||
Item type `"replay_recording"` contains a replay recording payload encoded in JSON *or* a gzipped JSON. | ||
Item type `"replay_recording"` contains a replay recording payload encoded in JSON _or_ a gzipped JSON. | ||
|
||
See the <Link to="/sdk/telemetry/replays/">replays</Link> documentation for the payload | ||
details. | ||
|
@@ -364,7 +366,7 @@ details. | |
|
||
**Envelope Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
**Additional Item Headers:** | ||
|
||
|
@@ -384,11 +386,11 @@ in JSON. | |
|
||
**Envelope Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Profile Chunk | ||
|
||
|
@@ -397,15 +399,15 @@ in JSON. | |
|
||
**Constraints:** | ||
|
||
*None* | ||
_None_ | ||
|
||
**Envelope Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Check-Ins | ||
|
||
|
@@ -421,11 +423,72 @@ details. | |
|
||
**Envelope Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
**Additional Item Headers:** | ||
|
||
_None_ | ||
|
||
### Log | ||
|
||
Item type `"log"` contains an array of log payloads encoded as JSON. This allows for multiple log payloads to be sent in a single envelope item. | ||
|
||
Only a single log item is allowed per envelope. The `item_count` field in the envelope item header must match the amount of logs sent, it's not optional. A `content_type` field in the envelope item header must be set to `application/vnd.sentry.items.log+json`. | ||
|
||
It's okay to mix logs from different traces into the same log envelope item, but if you do, you MUST not attach a DSC (dynamic sampling context) to the envelope header. | ||
|
||
See the <Link to="/sdk/telemetry/logs">Logs</Link> documentation for the payload | ||
details. | ||
|
||
Example: | ||
|
||
```json | ||
{ | ||
"type": "log", | ||
"item_count": 5, | ||
"content_type": "application/vnd.sentry.items.log+json" | ||
} | ||
{ | ||
"items": [{..log..}, {..log..}, {..log..}, {..log..}, {..log..}] | ||
} | ||
``` | ||
|
||
**Constraints:** | ||
|
||
_None_ | ||
|
||
**Envelope Headers:** | ||
|
||
_None_ | ||
|
||
**Additional Item Headers:** | ||
|
||
`item_count` | ||
|
||
: **integer, required.** The number of log items in the envelope. | ||
|
||
`content_type` | ||
|
||
: **string, required.** The content type of the log items. Must be `application/vnd.sentry.items.log+json`. | ||
|
||
### Otel Logs | ||
|
||
Item type `"otel_log"` contains an OpenTelemetry Logs payload encoded as JSON. Multiple Otel log envelope items can be sent in a single envelope. | ||
|
||
See the <Link to="/sdk/telemetry/logs">Logs</Link> documentation for the payload | ||
details. | ||
|
||
**Constraints:** | ||
|
||
_None_ | ||
|
||
**Envelope Headers:** | ||
|
||
_None_ | ||
|
||
**Additional Item Headers:** | ||
|
||
*None* | ||
_None_ | ||
|
||
### Reserved Types | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just scoped to the item, unfortunately naming clashes here "log item" and "envelope item"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming is hard - good catch, will fix.