ref(node): Use @sentry/conventions and vendor remaining semantic conventions#21635
Draft
mydea wants to merge 2 commits into
Draft
ref(node): Use @sentry/conventions and vendor remaining semantic conventions#21635mydea wants to merge 2 commits into
@sentry/conventions and vendor remaining semantic conventions#21635mydea wants to merge 2 commits into
Conversation
06214fd to
8ed390c
Compare
Contributor
size-limit report 📦
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Source span attribute keys in
@sentry/nodefrom@sentry/conventions/attributesinstead of the locally vendored./semconvconstants and@opentelemetry/semantic-conventions, for the attributes that have a@sentry/conventionsequivalent. This mirrors the previousref(aws-serverless): Use @sentry/conventionschange (#21597).In a second step, the symbols that have no
@sentry/conventionsequivalent and were still imported from@opentelemetry/semantic-conventionsare now vendored locally as well, so@sentry/node's source no longer imports from that package at all.No functional change — string values are identical throughout.
Details
@sentry/conventions/attributesacross the redis/ioredis, mongo, mongoose, mysql, mysql2, postgres, postgresjs, tedious, knex, kafka, amqplib, hapi, koa, connect, fastify, hono, firebase and undici integrations: thedb.*,http.*,url.*,server.*,network.peer.*,messaging.*,error.typeanduser_agent.originalkeys that exist in conventions. Now-unusedATTR_*exports were pruned from the vendoredsemconv.tsfiles (hapi/vendored/semconv.tsbecame empty and was deleted).net.peer.*,db.connection_string,db.mongodb.collection,db.sql.table,db.client.connection.*,db.response.status_code, kafka-specific keys, the amqplibsemconv-obsolete.tsset, and all*_VALUE_*/METRIC_*constants.@opentelemetry/semantic-conventionsimports so the package no longer depends on it at runtime: value/metric constants (DB_SYSTEM_NAME_VALUE_POSTGRESQL,DB_SYSTEM_NAME_VALUE_MYSQL,ERROR_TYPE_VALUE_OTHER,METRIC_DB_CLIENT_OPERATION_DURATION) moved into the relevantsemconv.ts; a newnode-fetch/vendored/semconv.tsholdsATTR_HTTP_REQUEST_METHOD_ORIGINALandMETRIC_HTTP_CLIENT_REQUEST_DURATIONfor the vendored undici instrumentation; anddb.response.status_codewas inlined into the first-partypostgresjs.ts.db.system/db.statement/db.name/http.methodkeys are deprecated in@sentry/conventions, so the few intentional emissions in vendored files that lack a whole-file lint disable carry a targetedtypescript/no-deprecateddisable.@opentelemetry/semantic-conventionsis still listed inpackage.json(it is no longer imported by source, but removing the dependency is intentionally left out of this refactor).