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: Add GRPC tracing #691

Merged
merged 1 commit into from
Aug 24, 2023
Merged

feat: Add GRPC tracing #691

merged 1 commit into from
Aug 24, 2023

Conversation

SinimaWath
Copy link
Contributor

Proposed changes

Adding support for gRPC otlp exporter

@FZambia
Copy link
Member

FZambia commented Aug 23, 2023

Hello @SinimaWath

Thanks for PR! When introducing Opentelemetry I wanted to avoid using additional opentelemetry configuration options in Centrifugo until really requred.

There is a OpenTelemetry Protocol Exporter spec which describes a way to specify exporter protocol: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#specify-protocol

It describes OTEL_EXPORTER_OTLP_PROTOCOL env var and says that possible values are:

grpc for protobuf-encoded data using gRPC wire format over HTTP/2 connection
http/protobuf for protobuf-encoded data over HTTP connection
http/json for JSON-encoded data over HTTP connection

Looks like we now by default using http/protobuf which is fine. So I propose change this PR a bit to look for OTEL_EXPORTER_OTLP_PROTOCOL in Centrifugo to decide which exporter to use. If specified allow only http/protobuf and grpc values. I suppose there is no real reason to support http/json.

What do you think?

@SinimaWath
Copy link
Contributor Author

@FZambia Thanks, for the answer,

I think, using specification based ENV Variable is good idea, will implement that.

@SinimaWath
Copy link
Contributor Author

@FZambia Done, could you check please?

@FZambia
Copy link
Member

FZambia commented Aug 24, 2023

Amazing, many thanks @SinimaWath

@FZambia FZambia self-requested a review August 24, 2023 17:20
@FZambia FZambia merged commit 7828342 into centrifugal:master Aug 24, 2023
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