fix(instrumentation-sequelize): do not include 'server.address' for SQLite DB spans#3436
Open
trentm wants to merge 2 commits intoopen-telemetry:mainfrom
Open
fix(instrumentation-sequelize): do not include 'server.address' for SQLite DB spans#3436trentm wants to merge 2 commits intoopen-telemetry:mainfrom
trentm wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
…QLite DB spans I've tweaked the instr to not include server.address / server.port for SQLite spans, because it doesn't make sense. Before this change it was using the SQLite *filename* as the `server.address`. This is not discussed in DB semantic conventions. I've asked about this in semconv Slack. I've also corrected the connection string for a SQLite in-memory database in the tests. The previous usage was creating an actual local *file* named 'memory'.
maryliag
reviewed
Mar 13, 2026
| const attributes = spans[0].attributes; | ||
| assert.strictEqual(attributes[ATTR_DB_SYSTEM_NAME], 'sqlite'); | ||
| assert.strictEqual(attributes[ATTR_SERVER_ADDRESS], 'memory'); | ||
| // db.namespace: I think we'd expect ":memory:" here, with the trailing |
Contributor
There was a problem hiding this comment.
is this a comment just for reviewers or was to plan to keep this?
asking because the "I think" might not be the best comment 😅
Contributor
Author
https://cloud-native.slack.com/archives/C041APFBYQP/p1773437220978069 |
seemk
reviewed
Mar 30, 2026
Comment on lines
+346
to
+348
| // colon as at https://www.sqlite.org/inmemorydb.html. However sequelize | ||
| // Sequelize#config.database drops the trailing ':'. | ||
| assert.strictEqual(attributes[ATTR_DB_NAMESPACE], ':memory'); |
Contributor
There was a problem hiding this comment.
This is indeed bizarre, but seems to be a bug in sequelize, where the sqlite path string is parsed as an URL: https://github.com/sequelize/sequelize/blob/v6.37.8/src/sequelize.js#L198
Since we already have a check for the database dialect, perhaps we can fix the name there as well? I.e. :memory would translate to :memory:
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.
I've tweaked the instr to not include server.address / server.port
for SQLite spans, because it doesn't make sense. Before this change
it was using the SQLite filename as the
server.address.This is not discussed in DB semantic conventions.
I've asked about this in semconv Slack.
I've also corrected the connection string for a SQLite in-memory
database in the tests. The previous usage was creating an actual local
file named 'memory'.