Skip to content

neo4j.core.bolt.request activesupport instrumentation is incorrect #1647

@yourpalal

Description

@yourpalal

The neo4j.core.bolt.request event duration seems to generally be very short, often 0ms. This is even the case when running queries that take multiple seconds to run.

Unfortunately, this makes it very hard to get an idea of how neo4j queries are performing, what queries are slow, etc.

My guess at what's wrong here is that it's measuring the time to send the query and get some response, but not to get the full response data. I could be wrong though. I tried to dig into this but I'm not familiar at all with neo4j-ruby-driver and seabolt, so I wasn't able to make much progress.

I was however able to confirm:

example

Below is the timing information for a query being run in the neo4j web interface. This query is shown in the log as taking 0ms. In both cases, the neo4j server is being run on my machine. The query itself is limited to 500 returned entities, but does basically a full scan of my neo4j db.

image

Runtime information:

versions:

    activegraph (10.1.0)
    neo4j-ruby-driver (1.7.4)
    activesupport (6.1.3)

    ruby 3.0.0 (mri)

neo4j: 4.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions