Skip to content

Commit

Permalink
[remote-storage][v2] Add IDL for dependency storage (#6738)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Towards #6629

## Description of the changes
- This PR adds the IDL for the dependency reader for the v2 remote
storage API

## How was this change tested?
- CI

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

---------

Signed-off-by: Mahad Zaryab <[email protected]>
  • Loading branch information
mahadzaryab1 authored Feb 17, 2025
1 parent 93038df commit 5e15f8f
Show file tree
Hide file tree
Showing 3 changed files with 344 additions and 0 deletions.
45 changes: 45 additions & 0 deletions internal/storage/v2/grpc/dependency_storage.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
syntax = "proto3";

package jaeger.storage.v2;

import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";

option go_package = "storage";

message GetDependenciesRequest {
// start_time is the start of the time interval to search for the dependencies.
google.protobuf.Timestamp start_time = 1 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
// end_time is the end of the time interval to search for the dependencies.
google.protobuf.Timestamp end_time = 2 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
}

// Dependency represents a relationship between two services.
message Dependency {
// parent is the name of the caller service.
string parent = 1;

// child is the name of the service being called.
string child = 2;

// call_count is the number of times the parent service called the child service.
uint64 call_count = 3;

// source contains the origin from where the dependency was extracted.
string source = 4;
}

message GetDependenciesResponse {
repeated Dependency dependencies = 1 [(gogoproto.nullable) = false];
}

service DependencyReader {
// GetDependencies loads service dependencies from storage.
rpc GetDependencies(GetDependenciesRequest) returns (GetDependenciesResponse);
}
298 changes: 298 additions & 0 deletions proto-gen/storage/v2/dependency_storage.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions scripts/makefiles/Protobuf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ proto-storage-v1:
.PHONY: proto-storage-v2
proto-storage-v2:
$(call proto_compile, proto-gen/storage/v2, internal/storage/v2/grpc/trace_storage.proto, -Iinternal/storage/v2/grpc/)
$(call proto_compile, proto-gen/storage/v2, internal/storage/v2/grpc/dependency_storage.proto, -Iinternal/storage/v2/grpc/)

.PHONY: proto-hotrod
proto-hotrod:
Expand Down

0 comments on commit 5e15f8f

Please sign in to comment.