neo4j / neo4j-go-driver

Neo4j Bolt Driver for Go
Apache License 2.0
485 stars 68 forks source link

Add Bolt 5.4 support and Telemetry API #533

Closed StephenCathcart closed 11 months ago

StephenCathcart commented 11 months ago

Neo4j would like to be able to track more information about driver API usage so that smarter decisions can be made on improving drivers and their stack.

The collection of metrics must be respectful of users. Thus, the collected metrics are:

  1. impossible to be tied back to the customer or user
  2. transparent to the users that inspect
  3. restrained to required metrics

The metric collection is disabled by default in Neo4j. It can be enabled in the server by setting server.bolt.telemetry.enabled to true.

However, the metric collection is enabled by default in the drivers. It can be disabled in the driver by configuring the driver with TelemetryDisabled to true. Default: false.

Metrics are only collected when enabled both in server and driver instances.

Disabling metrics on driver:

driver, _ := neo4j.NewDriverWithContext("neo4j://localhost:7687", neo4j.BasicAuth("neo4j", "password", ""), func(config *config.Config) {
    config.TelemetryDisabled = true
})
StephenCathcart commented 11 months ago

Metrics Implementation [Go]