In getsentry/sentry-javascript, replace internal usages of the remaining public constants in packages/core/src/semanticAttributes.ts that have exact string equivalents in @sentry/conventions/attributes.
Add @deprecated notices pointing to the conventions alternatives, while preserving the existing public exports and their literal values for backwards compatibility. Update imports/usages across source and tests. This is a constant/import cleanup: emitted attribute keys, values, and behavior must remain unchanged.
The following 18 constants have verified 1:1 replacements in conventions 0.25.0:
| Existing core constant |
Conventions export |
Identical attribute key |
SEMANTIC_ATTRIBUTE_SENTRY_OP |
SENTRY_OP |
sentry.op |
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN |
SENTRY_ORIGIN |
sentry.origin |
SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE |
SENTRY_STATUS_MESSAGE |
sentry.status.message |
SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON |
SENTRY_IDLE_SPAN_FINISH_REASON |
sentry.idle_span_finish_reason |
SEMANTIC_ATTRIBUTE_SENTRY_RELEASE |
SENTRY_RELEASE |
sentry.release |
SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT |
SENTRY_ENVIRONMENT |
sentry.environment |
SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS |
SENTRY_SDK_INTEGRATIONS |
sentry.sdk.integrations |
SEMANTIC_ATTRIBUTE_USER_ID |
USER_ID |
user.id |
SEMANTIC_ATTRIBUTE_USER_EMAIL |
USER_EMAIL |
user.email |
SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS |
USER_IP_ADDRESS |
user.ip_address |
SEMANTIC_ATTRIBUTE_USER_USERNAME |
USER_NAME |
user.name |
SEMANTIC_ATTRIBUTE_PROFILE_ID |
SENTRY_PROFILE_ID |
sentry.profile_id |
SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME |
SENTRY_EXCLUSIVE_TIME |
sentry.exclusive_time |
SEMANTIC_ATTRIBUTE_CACHE_HIT |
CACHE_HIT |
cache.hit |
SEMANTIC_ATTRIBUTE_CACHE_KEY |
CACHE_KEY |
cache.key |
SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE |
CACHE_ITEM_SIZE |
cache.item_size |
SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD |
HTTP_REQUEST_METHOD |
http.request.method |
GEN_AI_CONVERSATION_ID_ATTRIBUTE |
GEN_AI_CONVERSATION_ID |
gen_ai.conversation.id |
Keep the five already-deprecated core exports (segment name/ID, SDK name/version, and URL full) compatible. The link-type constant is already handled in #24958.
Leave constants without exact string equivalents unchanged: sentry.sample_rate, sentry.previous_trace_sample_rate, sentry.measurement_unit, sentry.measurement_value, and sentry.custom_span_name. In particular, SENTRY_CLIENT_SAMPLE_RATE resolves to sentry.client_sample_rate, so it is not a 1:1 replacement for sentry.sample_rate.
Verify that emitted attributes and public exports remain compatible, and check bundle size impact. Follow #22081 for the existing deprecation/import migration pattern.
In getsentry/sentry-javascript, replace internal usages of the remaining public constants in packages/core/src/semanticAttributes.ts that have exact string equivalents in
@sentry/conventions/attributes.Add
@deprecatednotices pointing to the conventions alternatives, while preserving the existing public exports and their literal values for backwards compatibility. Update imports/usages across source and tests. This is a constant/import cleanup: emitted attribute keys, values, and behavior must remain unchanged.The following 18 constants have verified 1:1 replacements in conventions 0.25.0:
SEMANTIC_ATTRIBUTE_SENTRY_OPSENTRY_OPsentry.opSEMANTIC_ATTRIBUTE_SENTRY_ORIGINSENTRY_ORIGINsentry.originSEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGESENTRY_STATUS_MESSAGEsentry.status.messageSEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASONSENTRY_IDLE_SPAN_FINISH_REASONsentry.idle_span_finish_reasonSEMANTIC_ATTRIBUTE_SENTRY_RELEASESENTRY_RELEASEsentry.releaseSEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENTSENTRY_ENVIRONMENTsentry.environmentSEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONSSENTRY_SDK_INTEGRATIONSsentry.sdk.integrationsSEMANTIC_ATTRIBUTE_USER_IDUSER_IDuser.idSEMANTIC_ATTRIBUTE_USER_EMAILUSER_EMAILuser.emailSEMANTIC_ATTRIBUTE_USER_IP_ADDRESSUSER_IP_ADDRESSuser.ip_addressSEMANTIC_ATTRIBUTE_USER_USERNAMEUSER_NAMEuser.nameSEMANTIC_ATTRIBUTE_PROFILE_IDSENTRY_PROFILE_IDsentry.profile_idSEMANTIC_ATTRIBUTE_EXCLUSIVE_TIMESENTRY_EXCLUSIVE_TIMEsentry.exclusive_timeSEMANTIC_ATTRIBUTE_CACHE_HITCACHE_HITcache.hitSEMANTIC_ATTRIBUTE_CACHE_KEYCACHE_KEYcache.keySEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZECACHE_ITEM_SIZEcache.item_sizeSEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHODHTTP_REQUEST_METHODhttp.request.methodGEN_AI_CONVERSATION_ID_ATTRIBUTEGEN_AI_CONVERSATION_IDgen_ai.conversation.idKeep the five already-deprecated core exports (segment name/ID, SDK name/version, and URL full) compatible. The link-type constant is already handled in #24958.
Leave constants without exact string equivalents unchanged:
sentry.sample_rate,sentry.previous_trace_sample_rate,sentry.measurement_unit,sentry.measurement_value, andsentry.custom_span_name. In particular,SENTRY_CLIENT_SAMPLE_RATEresolves tosentry.client_sample_rate, so it is not a 1:1 replacement forsentry.sample_rate.Verify that emitted attributes and public exports remain compatible, and check bundle size impact. Follow #22081 for the existing deprecation/import migration pattern.