Add initial implementation of pdatagrcp#3231
Add initial implementation of pdatagrcp#3231bogdandrutu merged 2 commits intoopen-telemetry:mainfrom
Conversation
|
@bogdandrutu Please add some notes in the PR description that clarify why this change is needed. |
tigrannajaryan
left a comment
There was a problem hiding this comment.
Idea LGTM, just one minor question.
| // LogsClient is the client API for OTLP-GRPC Logs service. | ||
| // | ||
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. | ||
| type LogsClient interface { |
There was a problem hiding this comment.
Do we need an interface? I assume there will be only one implementation ever. Should we simply, delete the interface and just have the struct?
There was a problem hiding this comment.
I can either expose the struct or the interface. I think exposing the interface is more future proof, because we can offer alternative implementations in the future. Not a big thing though, so if you feel strong I can change.
There was a problem hiding this comment.
Not a strong opinion. Works either way.
This is needed because if we split pdata, we will nolonger be able to depend on the InternalRep or generated proto classes (raw, grpc). The pdatagrcp will eventually be public once we stabilize the API. The API in the pdatagrcp package is inspired from the grpc generated classes and redirects all calls to the generated classes. Some simple renames: * TraceService[Client|Server] -> Traces[Client|Server] * MetricsService[Client|Server] -> Metrics[Client|Server] * LogsService[Client|Server] -> Logs[Client|Server] Other changes: * Replace usages of grpc generated classes in otlpexporter to excercise this new package. * Left some TODOs for the moment until this package is used more to determine the right API. Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
tigrannajaryan
left a comment
There was a problem hiding this comment.
LGTM, up to you if you want to do anything about the remaining comments.
| // LogsClient is the client API for OTLP-GRPC Logs service. | ||
| // | ||
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. | ||
| type LogsClient interface { |
There was a problem hiding this comment.
Not a strong opinion. Works either way.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Add initial implementation of pdatagrcp This is needed because if we split pdata, we will nolonger be able to depend on the InternalRep or generated proto classes (raw, grpc). The pdatagrcp will eventually be public once we stabilize the API. The API in the pdatagrcp package is inspired from the grpc generated classes and redirects all calls to the generated classes. Some simple renames: * TraceService[Client|Server] -> Traces[Client|Server] * MetricsService[Client|Server] -> Metrics[Client|Server] * LogsService[Client|Server] -> Logs[Client|Server] Other changes: * Replace usages of grpc generated classes in otlpexporter to excercise this new package. * Left some TODOs for the moment until this package is used more to determine the right API. Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Add details for the TODOs left Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This is needed because if we split pdata, we will nolonger be able to depend on the InternalRep or generated proto classes (raw, grpc).
The pdatagrcp will eventually be public once we stabilize the API.
The API in the pdatagrcp package is inspired from the grpc generated classes and redirects all calls to the generated classes. Some simple renames:
Other changes:
Signed-off-by: Bogdan Drutu bogdandrutu@gmail.com
Updates #3104