You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -38,8 +38,8 @@ The `type` and default key is `"device"`.
38
38
`family`
39
39
40
40
: _Optional_. The family of the device. This is usually the common part of model
41
-
names across generations. For instance, `iPhone` would be a reasonable family,
42
-
so would be `Samsung Galaxy`.
41
+
names across generations. For instance, `iPhone` would be a reasonable family,
42
+
so would be `Samsung Galaxy`.
43
43
44
44
`model`
45
45
@@ -56,12 +56,12 @@ The `type` and default key is `"device"`.
56
56
`battery_level`
57
57
58
58
: _Optional_. If the device has a battery, this can be a floating point value
59
-
defining the battery level (in the range 0-100).
59
+
defining the battery level (in the range 0-100).
60
60
61
61
`orientation`
62
62
63
63
: _Optional_. This can be a string `portrait` or `landscape` to define the
64
-
orientation of a device.
64
+
orientation of a device.
65
65
66
66
`manufacturer`
67
67
@@ -106,7 +106,7 @@ The `type` and default key is `"device"`.
106
106
`simulator`
107
107
108
108
: _Optional_. A flag indicating whether this device is a simulator or an actual
109
-
device.
109
+
device.
110
110
111
111
`memory_size`
112
112
@@ -131,17 +131,17 @@ The `type` and default key is `"device"`.
131
131
`external_storage_size`
132
132
133
133
: _Optional_. Total size of an attached external storage in bytes (for example,
134
-
android SDK card).
134
+
android SDK card).
135
135
136
136
`external_free_storage`
137
137
138
138
: _Optional_. Free size of an attached external storage in bytes (for example,
139
-
android SDK card).
139
+
android SDK card).
140
140
141
141
`boot_time`
142
142
143
143
: _Optional_. A formatted UTC timestamp when the system was booted. For example,
144
-
`"2018-02-08T12:52:12Z"`.
144
+
`"2018-02-08T12:52:12Z"`.
145
145
146
146
`timezone`
147
147
@@ -161,8 +161,8 @@ The `type` and default key is `"device"`.
161
161
162
162
`processor_frequency`
163
163
164
-
: _Optional_. Processor frequency in MHz. Note that the actual CPU frequency might vary depending on current load and power conditions,
165
-
especially on low-powered devices like phones and laptops.
164
+
: _Optional_. Processor frequency in MHz. Note that the actual CPU frequency might vary depending on current load and power conditions,
165
+
especially on low-powered devices like phones and laptops.
166
166
167
167
`device_type`
168
168
@@ -205,15 +205,15 @@ The `type` and default key is `"os"`. However, since contexts can be set
205
205
multiple times under different keys, there has historically been a lot of
206
206
confusion about which OS context represents what. So here's some examples:
207
207
208
-
* In events reported from a Python/ASP.NET/Rails web backend, the OS context
208
+
- In events reported from a Python/ASP.NET/Rails web backend, the OS context
209
209
under the default key `"os"` is the server's operating system, and is set by
210
210
the SDK (if at all).
211
211
212
212
Additionally, the Sentry server will attempt to parse the `User-Agent` header
213
213
from the event's [Request Interface](/sdk/event-payloads/request/) and create a _secondary_ OS
214
214
context under the non-default key `"client_os"`.
215
215
216
-
* In events reported from a JS web frontend, the SDK typically reports no OS
216
+
- In events reported from a JS web frontend, the SDK typically reports no OS
217
217
context.
218
218
219
219
The server however knows by looking at the platform (`"javascript"`) that the
@@ -222,11 +222,11 @@ confusion about which OS context represents what. So here's some examples:
222
222
223
223
To summarize:
224
224
225
-
*`"os"` key for the device generating the event.
226
-
*`"client_os"` key for an adjacent client device's OS (that is _not_ the
225
+
-`"os"` key for the device generating the event.
226
+
-`"client_os"` key for an adjacent client device's OS (that is _not_ the
227
227
device creating the event) if it's important. The Sentry server sets this as part of
228
228
User-Agent parsing, but SDKs can set this directly too.
229
-
* If in doubt, just send `"os"`. Any other keys are not searchable in the
229
+
- If in doubt, just send `"os"`. Any other keys are not searchable in the
230
230
product and will not be visually pronounced using icons, so using something
231
231
like `"server_os"` to clarify what you meant is probably going to
232
232
backfire with regards to the overall product experience.
@@ -252,7 +252,7 @@ To summarize:
252
252
`kernel_version`
253
253
254
254
: _Optional_. An independent kernel version string. This is typically the entire
255
-
output of the `uname` syscall.
255
+
output of the `uname` syscall.
256
256
257
257
`rooted`
258
258
@@ -265,10 +265,10 @@ To summarize:
265
265
`raw_description`
266
266
267
267
: _Optional_. An unprocessed description string obtained by the operating
268
-
system. For some well-known runtimes, Sentry will attempt to parse `name` and
269
-
`version` from this string, if they are not explicitly given.
268
+
system. For some well-known runtimes, Sentry will attempt to parse `name` and
269
+
`version` from this string, if they are not explicitly given.
270
270
271
-
### Example
271
+
### Example OS Context
272
272
273
273
The OS Context for the 3 major OSs should look like this:
274
274
@@ -278,7 +278,7 @@ The OS Context for the 3 major OSs should look like this:
278
278
"type": "os",
279
279
"name": "Windows",
280
280
"version": "10.0.19041",
281
-
"build": "662",
281
+
"build": "662"
282
282
},
283
283
"mac": {
284
284
"type": "os",
@@ -296,7 +296,6 @@ The OS Context for the 3 major OSs should look like this:
296
296
}
297
297
```
298
298
299
-
300
299
## Runtime Context
301
300
302
301
Runtime context describes a runtime in more detail. Typically, this context is
@@ -316,8 +315,8 @@ The `type` and default key is `"runtime"`.
316
315
`raw_description`
317
316
318
317
: _Optional_. An unprocessed description string obtained by the runtime. For
319
-
some well-known runtimes, Sentry will attempt to parse `name` and `version`
320
-
from this string, if they are not explicitly given.
318
+
some well-known runtimes, Sentry will attempt to parse `name` and `version`
319
+
from this string, if they are not explicitly given.
321
320
322
321
## App Context
323
322
@@ -342,7 +341,7 @@ The `type` and default key is `"app"`.
342
341
`app_identifier`
343
342
344
343
: _Optional_. Version-independent application identifier, often a dotted bundle
345
-
ID.
344
+
ID.
346
345
347
346
`app_name`
348
347
@@ -412,7 +411,7 @@ GPU context describes the GPU of the device.
412
411
413
412
: _Optional_. The device low-level API type.
414
413
415
-
Examples: `"Apple Metal"` or `"Direct3D11"`
414
+
Examples: `"Apple Metal"` or `"Direct3D11"`
416
415
417
416
`multi_threaded_rendering`
418
417
@@ -424,11 +423,11 @@ GPU context describes the GPU of the device.
424
423
425
424
`max_texture_size`
426
425
427
-
: _Optional_. Largest size of a texture that is supported by the graphics hardware. For example, `16384`.
426
+
: _Optional_. Largest size of a texture that is supported by the graphics hardware. For example, `16384`.
428
427
429
428
`graphics_shader_level`
430
429
431
-
: _Optional_. Approximate "shader capability" level of the graphics device. For example, `Shader Model 2.0, OpenGL ES 3.0, Metal / OpenGL ES 3.1, 27 (unknown)`.
430
+
: _Optional_. Approximate "shader capability" level of the graphics device. For example, `Shader Model 2.0, OpenGL ES 3.0, Metal / OpenGL ES 3.1, 27 (unknown)`.
432
431
433
432
`supports_draw_call_instancing`
434
433
@@ -446,17 +445,21 @@ GPU context describes the GPU of the device.
446
445
447
446
: _Optional_. Are geometry shaders available on the device?
448
447
449
-
Example:
448
+
### Example GPU Context
450
449
451
450
```json
452
-
"gpu": {
453
-
"name": "AMD Radeon Pro 560",
454
-
"vendor_name": "Apple",
455
-
"memory_size": 4096,
456
-
"api_type": "Metal",
457
-
"multi_threaded_rendering": true,
458
-
"version": "Metal",
459
-
"npot_support": "Full"
451
+
{
452
+
"contexts": {
453
+
"gpu": {
454
+
"name": "AMD Radeon Pro 560",
455
+
"vendor_name": "Apple",
456
+
"memory_size": 4096,
457
+
"api_type": "Metal",
458
+
"multi_threaded_rendering": true,
459
+
"version": "Metal",
460
+
"npot_support": "Full"
461
+
}
462
+
}
460
463
}
461
464
```
462
465
@@ -470,31 +473,35 @@ The `type` and default key is `"state"`.
470
473
471
474
: **Required**. Object with two keys: _Optional_`type` for naming the state library (e.g.: Redux, MobX, Vuex) and **Required**`value` that holds the state object.
472
475
473
-
Example:
476
+
### Example State Context
474
477
475
478
```json
476
-
"state": {
477
-
"state": {
478
-
"type": "MobX",
479
-
"value": {
480
-
"flights": [],
481
-
"airports": [],
482
-
"showModal": false
479
+
{
480
+
"contexts": {
481
+
"state": {
482
+
"state": {
483
+
"type": "MobX",
484
+
"value": {
485
+
"flights": [],
486
+
"airports": [],
487
+
"showModal": false
488
+
}
489
+
}
483
490
}
484
-
},
491
+
}
485
492
}
486
493
```
487
494
488
495
## Culture Context
489
496
490
-
Culture Context describes certain properties of the culture in which
497
+
Culture Context describes certain properties of the culture in which
491
498
the software is used.
492
499
493
500
The `type` and default key is `"culture"`.
494
501
495
502
`calendar`
496
503
497
-
: _Optional_. For example `GregorianCalendar`. Free form string.
504
+
: _Optional_. For example `GregorianCalendar`. Free form string.
498
505
499
506
`display_name`
500
507
@@ -512,20 +519,77 @@ The `type` and default key is `"culture"`.
512
519
513
520
: _Optional_. The timezone of the locale. For example, `Europe/Vienna`.
514
521
515
-
## Examples
522
+
## Cloud Resource Context
523
+
524
+
Cloud Resource Context describes certain properties of cloud provider the software is running.
525
+
The data in the context abides to the [Cloud](https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/cloud/) and [Host](https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/host/) semantic conventions of OpenTelemenetry.
526
+
527
+
The `type` and default key is `"cloud_resource"`.
528
+
529
+
`cloud.provider`
530
+
531
+
: _Optional_. Name of the cloud provider.
532
+
533
+
- List of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used:
534
+
-`alibaba_cloud` - Alibaba Cloud
535
+
-`aws` - Amazon Web Services
536
+
-`azure` - Microsoft Azure
537
+
-`gcp` - Google Cloud Platform
538
+
-`ibm_cloud` - IBM Cloud
539
+
-`tencent_cloud` - Tencent Cloud
540
+
- Example: `aws`
541
+
542
+
`cloud.account.id`
543
+
544
+
: _Optional_. The cloud account ID the resource is assigned to.
545
+
546
+
- Example: `111111111111`
547
+
548
+
`cloud.region`
549
+
550
+
: _Optional_. The geographical region the resource is running.
551
+
552
+
- Example: `us-central1` or `us-east-1`
553
+
554
+
`cloud.availability_zone`
555
+
556
+
: _Optional_. Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. In Google Cloud this is called `cloud.zone`.
557
+
558
+
- Example: `us-east-1c`
559
+
560
+
`cloud.platform`
561
+
562
+
: _Optional_. The cloud platform in use. The prefix of the service SHOULD match the one specified in `cloud.provider`.
563
+
564
+
- Example: `aws_ecs`
565
+
566
+
`host.id`
567
+
568
+
: _Optional_. Unique host ID.
569
+
570
+
- Example: `3635354529892309001`
571
+
572
+
`host.type`
573
+
574
+
: _Optional_. Machine type of host.
575
+
576
+
- Example: `t4g.medium`
577
+
578
+
### Example Cloud Resource Context
516
579
517
580
The following example illustrates the contexts part of the <Linkto="/sdk/event-payloads/">event payload</Link> and omits other attributes for simplicity.
0 commit comments