Skip to content

Introduce API Metrics/Telemetry #1142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 26, 2023
Merged

Introduce API Metrics/Telemetry #1142

merged 14 commits into from
Sep 26, 2023

Conversation

bigmontz
Copy link
Contributor

@bigmontz bigmontz commented Sep 20, 2023

Neo4j would like to be able to track more information about driver apis 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 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:

const driver = neo4j.driver(
    'neo4j://localhost:7687', neo4j.auth.basic('neo4j', 'password'), { telemetryDisabled: true })

Neo4j would like to be able to track more information about driver apis 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 should be:
    1. impossible to be tied back 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:
```typescript
const driver = neo4j.driver(host, auth, { telemetryDisabled: true })
```
@bigmontz bigmontz marked this pull request as ready for review September 21, 2023 14:02
bigmontz and others added 6 commits September 22, 2023 15:26
The problem is in that point we don't if the failure is a connection failure.
So, change the error type can break the retry.
Copy link
Member

@robsdedude robsdedude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚜

@bigmontz bigmontz merged commit 266671a into neo4j:5.0 Sep 26, 2023
@bigmontz bigmontz deleted the 5.x-telemetry branch September 26, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants