Open
Conversation
| const auth = getAuth(connectionProvider); | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| const attributes: Record<string, any> = { |
Contributor
There was a problem hiding this comment.
Can we add server.address/server.port
seemk
reviewed
Mar 10, 2026
|
|
||
| This module provides automatic instrumentation for the [`neo4j-driver`](https://github.com/neo4j/neo4j-javascript-driver) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package. | ||
|
|
||
| Compatible with OpenTelemetry JS API and SDK `1.0+`. |
Contributor
There was a problem hiding this comment.
The SDK is 2.x now, is this valid?
Contributor
Author
There was a problem hiding this comment.
More of a question for >half of the packages in this repo since most use the same readme text
As pointed out in pr the db system supports multiple operations in non-batch ops so it shouldn't be fetched from query.text. Neo4j driver doesn't expose the operation name so nothing remains
seemk
reviewed
Apr 10, 2026
| } | ||
|
|
||
| const span = self.tracer.startSpan( | ||
| `${connectionAttributes[ATTR_DB_NAMESPACE]}`, |
Contributor
There was a problem hiding this comment.
https://opentelemetry.io/docs/specs/semconv/db/database-spans/#generating-a-summary-of-the-query
I think it is ok to get the operation name from the query text. The [earlier comment] was valid only for db.operation.name attributes.
Contributor
There was a problem hiding this comment.
Span name is constructed with the attribute if it is available https://opentelemetry.io/docs/specs/semconv/db/database-spans/#name
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.
Which problem is this PR solving?
Add neo4j instrumentation, originally created by aspecto. Compared to the original, the code has been updated to support newer versions of neo4j-driver package (versions 5.x and 6.x) and to match the latest semantic conventions.