Description
For the next Major SDK version, we should stop sending attributes we deprecated in our conventions and (if not done already) replace them with their stable replacements.
With a bit help from Cursor, here's an audit of the repo:
AI Attributes (ai.*)
| Deprecated Attribute |
Replacement |
Files |
ai.model.provider |
gen_ai.system |
packages/core/src/tracing/vercel-ai/vercel-ai-attributes.ts |
ai.pipeline.name |
gen_ai.pipeline.name |
packages/core/src/tracing/vercel-ai/index.ts |
ai.streaming |
gen_ai.response.streaming |
packages/core/src/tracing/vercel-ai/index.ts |
Code Attributes (code.*)
| Deprecated Attribute |
Replacement |
Files (Source Code) |
code.filepath |
code.file.path |
packages/browser-utils/src/metrics/browserMetrics.ts |
code.function |
code.function.name |
packages/browser-utils/src/metrics/browserMetrics.ts, packages/remix/src/server/integrations/opentelemetry.ts |
Database Attributes (db.*)
| Deprecated Attribute |
Replacement |
Files (Source Code) |
db.name |
db.namespace |
Multiple integration test files |
db.operation |
db.operation.name |
packages/core/src/integrations/supabase.ts, multiple integration test files |
db.statement |
db.query.text |
packages/node/src/integrations/tracing/tedious.ts, packages/node/src/integrations/tracing/prisma.ts, packages/core/src/integrations/supabase.ts |
db.system |
db.system.name |
packages/node/src/integrations/tracing/tedious.ts, packages/node/src/integrations/tracing/prisma.ts, packages/core/src/integrations/supabase.ts |
HTTP Attributes (http.*)
| Deprecated Attribute |
Replacement |
Files (Source Code) |
http.client_ip |
client.address |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts |
http.flavor |
network.protocol.version |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts |
http.host |
server.address |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts |
http.method |
http.request.method |
packages/core/src/fetch.ts, packages/browser/src/tracing/request.ts, packages/node-core/src/integrations/http/httpServerSpansIntegration.ts, packages/node-core/src/integrations/node-fetch/SentryNodeFetchInstrumentation.ts, packages/node-core/src/integrations/http/outgoing-requests.ts, packages/sveltekit/src/server-common/load.ts, packages/sveltekit/src/server-common/handle.ts, packages/opentelemetry/src/utils/getRequestSpanData.ts, packages/core/src/types-hoist/request.ts, packages/browser/src/integrations/graphqlClient.ts |
http.response_content_length |
http.response.body.size |
packages/core/src/fetch.ts, packages/browser-utils/src/metrics/browserMetrics.ts |
http.response_transfer_size |
http.response.size |
packages/browser-utils/src/metrics/browserMetrics.ts |
http.scheme |
url.scheme |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts |
http.status_code |
http.response.status_code |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts (uses SEMATTRS_HTTP_STATUS_CODE) |
http.target |
url.path |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts, packages/solidstart/src/server/withServerActionInstrumentation.ts, packages/nextjs/src/common/utils/urls.ts, packages/react-router/src/server/instrumentation/reactRouter.ts |
http.url |
url.full |
packages/core/src/fetch.ts, packages/browser/src/tracing/request.ts, packages/node-core/src/integrations/http/httpServerSpansIntegration.ts, packages/browser/src/integrations/graphqlClient.ts, packages/nextjs/src/common/devErrorSymbolicationEventProcessor.ts, packages/nextjs/src/common/utils/dropMiddlewareTunnelRequests.ts |
http.user_agent |
user_agent.original |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts |
| Deprecated Attribute |
Replacement |
Files (Source Code) |
net.host.ip |
network.local.address |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts (via SEMATTRS_NET_HOST_IP) |
net.host.name |
server.address |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts |
net.host.port |
server.port |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts (via SEMATTRS_NET_HOST_PORT) |
net.peer.ip |
network.peer.address |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts (via SEMATTRS_NET_PEER_IP) |
net.peer.name |
server.address |
packages/node/src/integrations/tracing/redis.ts |
net.peer.port |
server.port |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts, packages/node/src/integrations/tracing/redis.ts |
net.transport |
network.transport |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts |
GenAI Attributes (gen_ai.*)
| Deprecated Attribute |
Replacement |
Files (Source Code) |
gen_ai.prompt |
No replacement |
packages/core/src/tracing/vercel-ai/utils.ts, packages/core/src/tracing/ai/gen-ai-attributes.ts |
gen_ai.request.available_tools |
gen_ai.tool.definitions |
packages/core/src/tracing/vercel-ai/index.ts, packages/core/src/tracing/ai/gen-ai-attributes.ts |
gen_ai.request.messages |
gen_ai.input.messages |
packages/core/src/tracing/vercel-ai/index.ts, packages/core/src/tracing/ai/gen-ai-attributes.ts |
gen_ai.response.text |
gen_ai.output.messages |
packages/core/src/tracing/vercel-ai/index.ts, packages/core/src/tracing/ai/gen-ai-attributes.ts |
gen_ai.response.tool_calls |
gen_ai.output.messages |
packages/core/src/tracing/vercel-ai/index.ts, packages/core/src/tracing/langchain/utils.ts, packages/core/src/tracing/ai/gen-ai-attributes.ts |
Other Deprecated Attributes
| Deprecated Attribute |
Replacement |
Files (Source Code) |
fs_error |
error.type |
packages/node/src/integrations/fs.ts |
profile_id |
sentry.profile_id |
packages/browser/src/profiling/integration.ts |
replay_id |
sentry.replay_id |
packages/replay-internal/src/util/sendReplayRequest.ts, packages/replay-internal/src/util/resetReplayIdOnDynamicSamplingContext.ts, packages/feedback/src/core/sendFeedback.ts |
OpenTelemetry Semantic Convention Constants Used (Deprecated)
These deprecated semantic convention constants from @opentelemetry/semantic-conventions are being used:
| Constant |
Files |
SEMATTRS_HTTP_STATUS_CODE |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts, packages/opentelemetry/src/utils/mapStatus.ts, packages/opentelemetry/src/spanExporter.ts |
SEMATTRS_HTTP_METHOD |
packages/opentelemetry/src/utils/parseSpanDescription.ts, packages/opentelemetry/src/utils/getRequestSpanData.ts, packages/opentelemetry/src/sampler.ts, packages/nextjs/src/server/index.ts, packages/nextjs/src/server/handleOnSpanStart.ts |
SEMATTRS_HTTP_URL |
packages/opentelemetry/src/utils/parseSpanDescription.ts, packages/opentelemetry/src/utils/isSentryRequest.ts, packages/opentelemetry/src/utils/getRequestSpanData.ts, packages/opentelemetry/src/sampler.ts, packages/opentelemetry/src/propagator.ts |
SEMATTRS_HTTP_TARGET |
packages/react-router/src/server/wrapServerLoader.ts, packages/react-router/src/server/wrapServerAction.ts, packages/react-router/src/server/instrumentation/reactRouter.ts, packages/opentelemetry/src/utils/parseSpanDescription.ts, packages/nextjs/src/server/index.ts, packages/nextjs/src/common/utils/dropMiddlewareTunnelRequests.ts |
SEMATTRS_HTTP_HOST |
packages/opentelemetry/test/utils/parseSpanDescription.test.ts |
SEMATTRS_NET_HOST_IP |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts |
SEMATTRS_NET_HOST_PORT |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts |
SEMATTRS_NET_PEER_IP |
packages/node-core/src/integrations/http/httpServerSpansIntegration.ts |
SEMATTRS_DB_SYSTEM |
packages/opentelemetry/src/utils/parseSpanDescription.ts |
SEMATTRS_DB_STATEMENT |
packages/opentelemetry/src/utils/parseSpanDescription.ts |
Description
For the next Major SDK version, we should stop sending attributes we deprecated in our conventions and (if not done already) replace them with their stable replacements.
With a bit help from Cursor, here's an audit of the repo:
AI Attributes (
ai.*)ai.model.providergen_ai.systempackages/core/src/tracing/vercel-ai/vercel-ai-attributes.tsai.pipeline.namegen_ai.pipeline.namepackages/core/src/tracing/vercel-ai/index.tsai.streaminggen_ai.response.streamingpackages/core/src/tracing/vercel-ai/index.tsCode Attributes (
code.*)code.filepathcode.file.pathpackages/browser-utils/src/metrics/browserMetrics.tscode.functioncode.function.namepackages/browser-utils/src/metrics/browserMetrics.ts,packages/remix/src/server/integrations/opentelemetry.tsDatabase Attributes (
db.*)db.namedb.namespacedb.operationdb.operation.namepackages/core/src/integrations/supabase.ts, multiple integration test filesdb.statementdb.query.textpackages/node/src/integrations/tracing/tedious.ts,packages/node/src/integrations/tracing/prisma.ts,packages/core/src/integrations/supabase.tsdb.systemdb.system.namepackages/node/src/integrations/tracing/tedious.ts,packages/node/src/integrations/tracing/prisma.ts,packages/core/src/integrations/supabase.tsHTTP Attributes (
http.*)http.client_ipclient.addresspackages/node-core/src/integrations/http/httpServerSpansIntegration.tshttp.flavornetwork.protocol.versionpackages/node-core/src/integrations/http/httpServerSpansIntegration.tshttp.hostserver.addresspackages/node-core/src/integrations/http/httpServerSpansIntegration.tshttp.methodhttp.request.methodpackages/core/src/fetch.ts,packages/browser/src/tracing/request.ts,packages/node-core/src/integrations/http/httpServerSpansIntegration.ts,packages/node-core/src/integrations/node-fetch/SentryNodeFetchInstrumentation.ts,packages/node-core/src/integrations/http/outgoing-requests.ts,packages/sveltekit/src/server-common/load.ts,packages/sveltekit/src/server-common/handle.ts,packages/opentelemetry/src/utils/getRequestSpanData.ts,packages/core/src/types-hoist/request.ts,packages/browser/src/integrations/graphqlClient.tshttp.response_content_lengthhttp.response.body.sizepackages/core/src/fetch.ts,packages/browser-utils/src/metrics/browserMetrics.tshttp.response_transfer_sizehttp.response.sizepackages/browser-utils/src/metrics/browserMetrics.tshttp.schemeurl.schemepackages/node-core/src/integrations/http/httpServerSpansIntegration.tshttp.status_codehttp.response.status_codepackages/node-core/src/integrations/http/httpServerSpansIntegration.ts(usesSEMATTRS_HTTP_STATUS_CODE)http.targeturl.pathpackages/node-core/src/integrations/http/httpServerSpansIntegration.ts,packages/solidstart/src/server/withServerActionInstrumentation.ts,packages/nextjs/src/common/utils/urls.ts,packages/react-router/src/server/instrumentation/reactRouter.tshttp.urlurl.fullpackages/core/src/fetch.ts,packages/browser/src/tracing/request.ts,packages/node-core/src/integrations/http/httpServerSpansIntegration.ts,packages/browser/src/integrations/graphqlClient.ts,packages/nextjs/src/common/devErrorSymbolicationEventProcessor.ts,packages/nextjs/src/common/utils/dropMiddlewareTunnelRequests.tshttp.user_agentuser_agent.originalpackages/node-core/src/integrations/http/httpServerSpansIntegration.tsnet.host.ipnetwork.local.addresspackages/node-core/src/integrations/http/httpServerSpansIntegration.ts(viaSEMATTRS_NET_HOST_IP)net.host.nameserver.addresspackages/node-core/src/integrations/http/httpServerSpansIntegration.tsnet.host.portserver.portpackages/node-core/src/integrations/http/httpServerSpansIntegration.ts(viaSEMATTRS_NET_HOST_PORT)net.peer.ipnetwork.peer.addresspackages/node-core/src/integrations/http/httpServerSpansIntegration.ts(viaSEMATTRS_NET_PEER_IP)net.peer.nameserver.addresspackages/node/src/integrations/tracing/redis.tsnet.peer.portserver.portpackages/node-core/src/integrations/http/httpServerSpansIntegration.ts,packages/node/src/integrations/tracing/redis.tsnet.transportnetwork.transportpackages/node-core/src/integrations/http/httpServerSpansIntegration.tsGenAI Attributes (
gen_ai.*)gen_ai.promptpackages/core/src/tracing/vercel-ai/utils.ts,packages/core/src/tracing/ai/gen-ai-attributes.tsgen_ai.request.available_toolsgen_ai.tool.definitionspackages/core/src/tracing/vercel-ai/index.ts,packages/core/src/tracing/ai/gen-ai-attributes.tsgen_ai.request.messagesgen_ai.input.messagespackages/core/src/tracing/vercel-ai/index.ts,packages/core/src/tracing/ai/gen-ai-attributes.tsgen_ai.response.textgen_ai.output.messagespackages/core/src/tracing/vercel-ai/index.ts,packages/core/src/tracing/ai/gen-ai-attributes.tsgen_ai.response.tool_callsgen_ai.output.messagespackages/core/src/tracing/vercel-ai/index.ts,packages/core/src/tracing/langchain/utils.ts,packages/core/src/tracing/ai/gen-ai-attributes.tsOther Deprecated Attributes
fs_errorerror.typepackages/node/src/integrations/fs.tsprofile_idsentry.profile_idpackages/browser/src/profiling/integration.tsreplay_idsentry.replay_idpackages/replay-internal/src/util/sendReplayRequest.ts,packages/replay-internal/src/util/resetReplayIdOnDynamicSamplingContext.ts,packages/feedback/src/core/sendFeedback.tsOpenTelemetry Semantic Convention Constants Used (Deprecated)
These deprecated semantic convention constants from
@opentelemetry/semantic-conventionsare being used:SEMATTRS_HTTP_STATUS_CODEpackages/node-core/src/integrations/http/httpServerSpansIntegration.ts,packages/opentelemetry/src/utils/mapStatus.ts,packages/opentelemetry/src/spanExporter.tsSEMATTRS_HTTP_METHODpackages/opentelemetry/src/utils/parseSpanDescription.ts,packages/opentelemetry/src/utils/getRequestSpanData.ts,packages/opentelemetry/src/sampler.ts,packages/nextjs/src/server/index.ts,packages/nextjs/src/server/handleOnSpanStart.tsSEMATTRS_HTTP_URLpackages/opentelemetry/src/utils/parseSpanDescription.ts,packages/opentelemetry/src/utils/isSentryRequest.ts,packages/opentelemetry/src/utils/getRequestSpanData.ts,packages/opentelemetry/src/sampler.ts,packages/opentelemetry/src/propagator.tsSEMATTRS_HTTP_TARGETpackages/react-router/src/server/wrapServerLoader.ts,packages/react-router/src/server/wrapServerAction.ts,packages/react-router/src/server/instrumentation/reactRouter.ts,packages/opentelemetry/src/utils/parseSpanDescription.ts,packages/nextjs/src/server/index.ts,packages/nextjs/src/common/utils/dropMiddlewareTunnelRequests.tsSEMATTRS_HTTP_HOSTpackages/opentelemetry/test/utils/parseSpanDescription.test.tsSEMATTRS_NET_HOST_IPpackages/node-core/src/integrations/http/httpServerSpansIntegration.tsSEMATTRS_NET_HOST_PORTpackages/node-core/src/integrations/http/httpServerSpansIntegration.tsSEMATTRS_NET_PEER_IPpackages/node-core/src/integrations/http/httpServerSpansIntegration.tsSEMATTRS_DB_SYSTEMpackages/opentelemetry/src/utils/parseSpanDescription.tsSEMATTRS_DB_STATEMENTpackages/opentelemetry/src/utils/parseSpanDescription.ts