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

Additional keepalive diagnostics #1692

Merged
merged 4 commits into from
Nov 1, 2023
Merged

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Oct 30, 2023

Motivation:

It's useful to know the state of keepalive when debugging connection issues. gRPC doesn't emit any logs around this at the moment which makes debugging difficult.

Modifications:

Add additional logs to the idle handler when:

  • the idle timeout task is scheduled, cancelled, and fires
  • the keepalive timer is scheduled
  • the scheduled close timer is fired
  • the connection is closed
  • GOAWAY frames are sent (already logs on receive)
  • PING frames are sent and received

Result:

Better visibility into connection lifecycle

Motivation:

It's useful to know the state of keepalive when debugging connection
issues. gRPC doesn't emit any logs around this at the moment which makes
debugging difficult.

Modifications:

Add additional logs to the idle handler when:
- the idle timeout task is scheduled, cancelled, and fires
- the keepalive timer is scheduled
- the scheduled close timer is fired
- the connection is closed
- GOAWAY frames are sent (already logs on receive)
- PING frames are sent and received

Result:

Better visibility into connection lifecycle
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Oct 30, 2023
@glbrntt glbrntt requested a review from Lukasa October 30, 2023 13:11
Sources/GRPC/GRPCIdleHandler.swift Outdated Show resolved Hide resolved
Sources/GRPC/GRPCIdleHandler.swift Outdated Show resolved Hide resolved
Sources/GRPC/GRPCIdleHandler.swift Outdated Show resolved Hide resolved
Sources/GRPC/GRPCIdleHandler.swift Outdated Show resolved Hide resolved
@glbrntt glbrntt requested a review from Lukasa October 30, 2023 14:38
@glbrntt glbrntt requested a review from gjcairo November 1, 2023 13:35
@glbrntt glbrntt enabled auto-merge (squash) November 1, 2023 14:48
@glbrntt glbrntt merged commit 663a852 into grpc:main Nov 1, 2023
@glbrntt glbrntt deleted the gb-log-on-keepalive branch November 1, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants