diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 8055dac5..77b7d8cb 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -1427,6 +1427,26 @@ export const CACHE_TTL = 'cache.ttl'; */ export type CACHE_TTL_TYPE = number; +// Path: model/attributes/cache/cache__write.json + +/** + * If the cache operation resulted in a write to the cache. `cache.write` + * + * Attribute Value Type: `boolean` {@link CACHE_WRITE_TYPE} + * + * Contains PII: false + * + * Attribute defined in OTEL: No + * + * @example true + */ +export const CACHE_WRITE = 'cache.write'; + +/** + * Type for {@link CACHE_WRITE} cache.write + */ +export type CACHE_WRITE_TYPE = boolean; + // Path: model/attributes/channel.json /** @@ -10129,6 +10149,7 @@ export const ATTRIBUTE_TYPE: Record = { [CACHE_KEY]: 'string[]', [CACHE_OPERATION]: 'string', [CACHE_TTL]: 'integer', + [CACHE_WRITE]: 'boolean', [CHANNEL]: 'string', [CLIENT_ADDRESS]: 'string', [CLIENT_PORT]: 'integer', @@ -10610,6 +10631,7 @@ export type AttributeName = | typeof CACHE_KEY | typeof CACHE_OPERATION | typeof CACHE_TTL + | typeof CACHE_WRITE | typeof CHANNEL | typeof CLIENT_ADDRESS | typeof CLIENT_PORT @@ -11900,6 +11922,17 @@ export const ATTRIBUTE_METADATA: Record = { sdks: ['php-laravel'], changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }], }, + [CACHE_WRITE]: { + brief: 'If the cache operation resulted in a write to the cache.', + type: 'boolean', + pii: { + isPii: 'false', + }, + isInOtel: false, + example: true, + sdks: ['java'], + changelog: [{ version: 'next' }], + }, [CHANNEL]: { brief: 'The channel name that is being used.', type: 'string', @@ -16861,6 +16894,7 @@ export type Attributes = { [CACHE_KEY]?: CACHE_KEY_TYPE; [CACHE_OPERATION]?: CACHE_OPERATION_TYPE; [CACHE_TTL]?: CACHE_TTL_TYPE; + [CACHE_WRITE]?: CACHE_WRITE_TYPE; [CHANNEL]?: CHANNEL_TYPE; [CLIENT_ADDRESS]?: CLIENT_ADDRESS_TYPE; [CLIENT_PORT]?: CLIENT_PORT_TYPE; diff --git a/model/attributes/cache/cache__write.json b/model/attributes/cache/cache__write.json new file mode 100644 index 00000000..a2fb2a36 --- /dev/null +++ b/model/attributes/cache/cache__write.json @@ -0,0 +1,16 @@ +{ + "key": "cache.write", + "brief": "If the cache operation resulted in a write to the cache.", + "type": "boolean", + "pii": { + "key": "false" + }, + "is_in_otel": false, + "example": true, + "sdks": ["java"], + "changelog": [ + { + "version": "next" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 248cb3c4..a3f59aec 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -997,6 +997,16 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 120 """ + # Path: model/attributes/cache/cache__write.json + CACHE_WRITE: Literal["cache.write"] = "cache.write" + """If the cache operation resulted in a write to the cache. + + Type: bool + Contains PII: false + Defined in OTEL: No + Example: true + """ + # Path: model/attributes/channel.json CHANNEL: Literal["channel"] = "channel" """The channel name that is being used. @@ -6407,6 +6417,17 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.0.0"), ], ), + "cache.write": AttributeMetadata( + brief="If the cache operation resulted in a write to the cache.", + type=AttributeType.BOOLEAN, + pii=PiiInfo(isPii=IsPii.FALSE), + is_in_otel=False, + example=True, + sdks=["java"], + changelog=[ + ChangelogEntry(version="next"), + ], + ), "channel": AttributeMetadata( brief="The channel name that is being used.", type=AttributeType.STRING, @@ -11351,6 +11372,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "cache.key": List[str], "cache.operation": str, "cache.ttl": int, + "cache.write": bool, "channel": str, "client.address": str, "client.port": int,