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

Use connect-go and connect-web for APIs #1664

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

metalmatze
Copy link
Member

This was my 20% Friday project and I'll continue.

It makes Parca use Connect which makes creating the Server for both HTTP/JSON and gRPC/protobuf a lot easier.

The Targets page of Parca already works via the newly generated APIs with HTTP/JSON directly.
And some of the Query service APIs also work. This is the most work left, converting the APIs.

Since we use a couple of gRPC interceptors we need to write these for the time being ourselves. It should be too complex. In fact, for Pyrra I've already started to write an interceptor that creates the known grpc_server_* and grpc_client_* metrics.
AFAIK the buf people are working on an Open Telemetry interceptor too. I'll ask them about it.

*
* @generated from field: int64 diff = 4;
*/
diff = protoInt64.zero;
Copy link
Member

Choose a reason for hiding this comment

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

That looks nice, it automatically handles the int64 support: https://github.com/bufbuild/protobuf-es/blob/main/packages/protobuf/src/proto-int64.ts

The config was manual with the other plugin: https://github.com/timostamm/protobuf-ts/blob/master/MANUAL.md#bigint-support

The strict mode PR (#1632) surfaces some potential issues around it, and you might need to handle them, a large comment in the plugin's code seems to explain how

Copy link
Member

@maxbrunet maxbrunet left a comment

Choose a reason for hiding this comment

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

Exciting to see movement on this PR!

Since we use a couple of gRPC interceptors we need to write these for the time being ourselves. It should be too complex. In fact, for Pyrra I've already started to write an interceptor that creates the known grpc_server_* and grpc_client_* metrics.
AFAIK the buf people are working on an Open Telemetry interceptor too. I'll ask them about it.

btw connect-opentelemetry-go has had its first release: https://buf.build/blog/connect-opentelemetry-go

@@ -12,6 +12,11 @@ plugins:
out: gen/proto/go
opt: paths=source_relative

# renovate: datasource=github-releases depName=bufbuild/connect-go
- plugin: connect-go
Copy link
Member

Choose a reason for hiding this comment

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

Aliases! I'd still pin the version of the plugins to ensure it is reproducible

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.

None yet

2 participants