Skip to content
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

feat: Performance analysis tooling #794

Merged
merged 124 commits into from
Feb 5, 2025
Merged

Conversation

novoj
Copy link
Collaborator

@novoj novoj commented Feb 5, 2025

We want to extend evitaLab with a new view that would list all recent requests and queries / mutations executed within them and visualise them in a comprehensible way. This tooling will build on a new facility in evitaDB that allows to store executed queries in the file log and aggregate them with mutations in WAL and provide the tooling with an aggregated view over them.

We know from previous experience that such tools are crucial for the development of high performance applications. Developers make many errors (often N+1 errors) that are difficult to track without such tools. When the list of all queries to the database is visible and can be traced back to a particular page/request, developers can much better reason about the problems.

novoj and others added 30 commits August 8, 2024 20:28
# Conflicts:
#	evita_engine/src/main/java/io/evitadb/core/Catalog.java
#	evita_engine/src/main/java/io/evitadb/core/EntityCollection.java
#	evita_engine/src/main/java/io/evitadb/core/EvitaSession.java
#	evita_engine/src/main/java/io/evitadb/core/query/QueryPlan.java
#	evita_engine/src/main/java/module-info.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcEntityReference.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcEntityReferenceWithParent.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcEvitaSessionAPI.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcPrice.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcUpsertPriceMutation.java
# Conflicts:
#	evita_api/src/main/java/io/evitadb/api/EntityCollectionContract.java
#	evita_engine/src/main/java/io/evitadb/core/Catalog.java
#	evita_engine/src/main/java/io/evitadb/core/EntityCollection.java
#	evita_engine/src/main/java/io/evitadb/core/EvitaSession.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcAttributeSchema.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcEntitySchemaMutation.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcReferenceSchema.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcReferenceSchemaMutations.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcSetReferenceSchemaFacetedMutation.java
#	evita_external_api/evita_external_api_grpc/shared/src/main/java/io/evitadb/externalApi/grpc/generated/GrpcSetReferenceSchemaIndexedMutation.java
Added tests, parsing logic, documentation. Labels are attached to tracing spans and JFR events automatically. Also are serialized along with the query to traffic recording.

Refs: #298
Introduced API for source query recording and relations between source query and internal sub-queries.

Refs: #298
Introduced API for source query recording and relations between source query and internal sub-queries. Added serializers and tests for them.

Refs: #298
API is also implemented but not tested.

Refs: #298
# Conflicts:
#	evita_api/src/main/java/io/evitadb/api/requestResponse/EvitaRequest.java
The entire traffic recording gRPC API was moved to separate service.

Refs: #298
lukashornych and others added 24 commits January 29, 2025 23:14
AAdded client IP to the labels.

Refs: #298
… type attributes

The query:

```graphQL
query {
  queryProduct(
    filterBy: {
      entityLocaleEquals: en
      attributeUrlInactiveStartsWith: "/"
    }
  ) {
    recordPage {
      data {
        primaryKey
        attributes {
          url
        }
      }
    }
  }
}
```

Doesn't work on demo schema since the `urlInactive` is string array.

Refs: #778
# Conflicts:
#	.github/workflows/ci-master.yml
@novoj novoj added the enhancement New feature or request label Feb 5, 2025
@novoj novoj added this to the 2025.1 milestone Feb 5, 2025
@novoj novoj self-assigned this Feb 5, 2025
@novoj novoj linked an issue Feb 5, 2025 that may be closed by this pull request
1 task
@novoj novoj merged commit 3e402d5 into dev Feb 5, 2025
3 of 4 checks passed
@novoj novoj deleted the 298-performance-analysis-tooling branch February 5, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance analysis tooling
2 participants