Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,351 changes: 1,258 additions & 93 deletions javascript/sentry-conventions/src/attributes.ts

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions javascript/sentry-conventions/src/op.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,11 @@ export const FILE = 'file';

export const SERIALIZE = 'serialize';

/**
* A call from JavaScript into a React Native native module, or an aggregate of such calls.
*/
export const TURBO_MODULE = 'turbo_module';

// Path: model/op/object.json
// Name: object

Expand Down
379 changes: 379 additions & 0 deletions javascript/sentry-conventions/src/search.ts

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions model/attributes/react_native/react_native__architecture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"key": "react_native.architecture",
"brief": "The React Native architecture the app is running on. `new` for the New Architecture, where native modules are resolved as TurboModules through `TurboModuleRegistry`, `legacy` for the Old Architecture bridge.",
"type": "string",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["new", "legacy"],
"alias": ["turbo_module.arch"],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.architecture attribute"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"key": "react_native.module.call.count",
"brief": "The number of native module calls observed during the lifetime of the span.",
"type": "integer",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": [42],
"alias": ["turbo_module.total_call_count", "turbo_modules.total_call_count"],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.module.call.count attribute"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"key": "react_native.module.call.distinct_count",
"brief": "The number of distinct native module and method pairs called during the lifetime of the span. Useful as a cardinality signal when the per-method breakdown has been truncated.",
"type": "integer",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": [7],
"alias": ["turbo_module.unique_methods", "turbo_modules.unique_methods"],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.module.call.distinct_count attribute"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"key": "react_native.module.duration.max",
"brief": "The duration of the slowest single native module call observed during the lifetime of the span, in milliseconds.",
"type": "double",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": [512.5],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.module.duration.max attribute"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"key": "react_native.module.duration.total",
"brief": "The combined wall-clock duration of all native module calls observed during the lifetime of the span, in milliseconds. Calls overlap, so this can exceed the span duration.",
"type": "double",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": [128.45],
"alias": ["turbo_module.total_duration_ms", "turbo_modules.total_duration_ms"],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.module.duration.total attribute"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"key": "react_native.module.error.count",
"brief": "The number of native module calls that failed during the lifetime of the span. A call counts as failed when it threw, rejected, or \u2014 on the Old Architecture bridge only \u2014 invoked its failure callback.",
"type": "integer",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": [2],
"alias": ["turbo_module.total_error_count", "turbo_modules.total_error_count"],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.module.error.count attribute"
}
]
}
18 changes: 18 additions & 0 deletions model/attributes/react_native/react_native__module__kind.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"key": "react_native.module.kind",
"brief": "Whether the native module call completed synchronously or reported completion later through a Promise or a callback. One of `sync` or `async`.",
"type": "string",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["sync", "async"],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.module.kind attribute"
}
]
}
20 changes: 20 additions & 0 deletions model/attributes/react_native/react_native__module__method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"key": "react_native.module.method",
"brief": "The name of the native module method that was called.",
"type": "string",
"apply_scrubbing": {
"key": "manual",
"reason": "Native module and method names are app-defined identifiers, but scrubbing them would make the call attribution unusable"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["getUniqueId"],
"alias": ["turbo_module.method"],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.module.method attribute"
}
]
}
20 changes: 20 additions & 0 deletions model/attributes/react_native/react_native__module__name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"key": "react_native.module.name",
"brief": "The name of the native module the call was dispatched to. On the New Architecture this is the TurboModule name, on the Old Architecture the `NativeModules` key.",
"type": "string",
"apply_scrubbing": {
"key": "manual",
"reason": "Native module and method names are app-defined identifiers, but scrubbing them would make the call attribution unusable"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["RNDeviceInfo"],
"alias": ["turbo_module.name"],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.module.name attribute"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"key": "react_native.module.top.duration",
"brief": "The total duration attributed to `react_native.module.top.name`, in milliseconds.",
"type": "double",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": [87.25],
"alias": ["turbo_module.top_module_duration_ms"],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.module.top.duration attribute"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"key": "react_native.module.top.name",
"brief": "The native module and method that accounted for the most total duration during the lifetime of the span, formatted as `<module>.<method>`.",
"type": "string",
"apply_scrubbing": {
"key": "manual",
"reason": "Native module and method names are app-defined identifiers, but scrubbing them would make the call attribution unusable"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["RNDeviceInfo.getUniqueId"],
"alias": ["turbo_module.top_module"],
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added react_native.module.top.name attribute"
}
]
}
24 changes: 24 additions & 0 deletions model/attributes/turbo_module/turbo_module__arch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"key": "turbo_module.arch",
"brief": "The React Native architecture the call was observed on. `new` for a TurboModule resolved through `TurboModuleRegistry`, `legacy` for a module reached over the Old Architecture bridge. Only applies to React Native.",
"type": "string",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["new", "legacy"],
"alias": ["react_native.architecture"],
"deprecation": {
"replacement": "react_native.architecture",
"reason": "Replaced by the `react_native.*` namespace, which also covers native module calls made over the Old Architecture bridge, which are not TurboModules",
"_status": "backfill"
},
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added turbo_module.arch and deprecated it in favor of react_native.architecture"
}
]
}
25 changes: 25 additions & 0 deletions model/attributes/turbo_module/turbo_module__method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"key": "turbo_module.method",
"brief": "The name of the native module method that was called. Only applies to React Native.",
"type": "string",
"apply_scrubbing": {
"key": "manual",
"reason": "Native module and method names are app-defined identifiers, but scrubbing them would make the call attribution unusable"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["getUniqueId"],
"alias": ["react_native.module.method"],
"deprecation": {
"replacement": "react_native.module.method",
"reason": "Replaced by the `react_native.*` namespace, which also covers native module calls made over the Old Architecture bridge, which are not TurboModules",
"_status": "backfill"
},
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added turbo_module.method and deprecated it in favor of react_native.module.method"
}
]
}
25 changes: 25 additions & 0 deletions model/attributes/turbo_module/turbo_module__name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"key": "turbo_module.name",
"brief": "The name of the native module the call was dispatched to. On the New Architecture this is the TurboModule name, on the Old Architecture the `NativeModules` key. Only applies to React Native.",
"type": "string",
"apply_scrubbing": {
"key": "manual",
"reason": "Native module and method names are app-defined identifiers, but scrubbing them would make the call attribution unusable"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["RNDeviceInfo"],
"alias": ["react_native.module.name"],
"deprecation": {
"replacement": "react_native.module.name",
"reason": "Replaced by the `react_native.*` namespace, which also covers native module calls made over the Old Architecture bridge, which are not TurboModules",
"_status": "backfill"
},
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added turbo_module.name and deprecated it in favor of react_native.module.name"
}
]
}
25 changes: 25 additions & 0 deletions model/attributes/turbo_module/turbo_module__top_module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"key": "turbo_module.top_module",
"brief": "The native module and method that accounted for the most total duration during the lifetime of the span. Only applies to React Native.",
"type": "string",
"apply_scrubbing": {
"key": "manual",
"reason": "Native module and method names are app-defined identifiers, but scrubbing them would make the call attribution unusable"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["RNDeviceInfo.getUniqueId"],
"alias": ["react_native.module.top.name"],
"deprecation": {
"replacement": "react_native.module.top.name",
"reason": "Replaced by the `react_native.module.*` namespace, which also covers native module calls made over the Old Architecture bridge, and which drops the `total_` prefix and `_ms` suffix in favor of dot-separated logical grouping",
"_status": "backfill"
},
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added turbo_module.top_module and deprecated it in favor of react_native.module.top.name"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"key": "turbo_module.top_module_duration_ms",
"brief": "The total duration attributed to the top native module method, in milliseconds. Only applies to React Native.",
"type": "double",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": [87.25],
"alias": ["react_native.module.top.duration"],
"deprecation": {
"replacement": "react_native.module.top.duration",
"reason": "Replaced by the `react_native.module.*` namespace, which also covers native module calls made over the Old Architecture bridge, and which drops the `total_` prefix and `_ms` suffix in favor of dot-separated logical grouping",
"_status": "backfill"
},
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added turbo_module.top_module_duration_ms and deprecated it in favor of react_native.module.top.duration"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"key": "turbo_module.total_call_count",
"brief": "The number of native module calls observed during the lifetime of the span. Only applies to React Native.",
"type": "integer",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": [42],
"alias": ["react_native.module.call.count", "turbo_modules.total_call_count"],
"deprecation": {
"replacement": "react_native.module.call.count",
"reason": "Replaced by the `react_native.module.*` namespace, which also covers native module calls made over the Old Architecture bridge, and which drops the `total_` prefix and `_ms` suffix in favor of dot-separated logical grouping",
"_status": "backfill"
},
"changelog": [
{
"version": "next",
"prs": [564],
"description": "Added turbo_module.total_call_count and deprecated it in favor of react_native.module.call.count"
}
]
}
Loading
Loading