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

Make Netty Instrumentation HttpServerRequestTracingHandler propagate "Channel Inactive" event to downstream according to parent contract #10303

Conversation

Periecle
Copy link
Contributor

Motivation

Current Netty instrumentation of ChannelHandlerAdapter violates parent contract of ChannelHandler. It does not propagate Channel Inactive event to downstream handlers, which may lead to bad side effects(In my case there was a memory leak, because connection-close channel handler was not called with Channel Inactive event).
That PR calls super.channelInactive(ctx) on each execution path of HttpServerRequestTracingHandler channelInactive method to avoid that situation.

Additional considerations

I suggest backporting that fix to 1.32.x, as that issue can break a lot of custom Netty-based code.

@Periecle Periecle requested a review from a team as a code owner January 22, 2024 11:39
@Periecle Periecle requested a review from laurit January 22, 2024 13:35
…"Channel Inactive" event to downstream according to parent contract
@Periecle Periecle force-pushed the fix/netty-channel-inactive-event-propagation branch from 516cfaf to 263458e Compare January 22, 2024 14:05
@Periecle
Copy link
Contributor Author

@laurit can we merge it?

@laurit laurit merged commit e04b448 into open-telemetry:main Jan 23, 2024
47 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 23, 2024
…"Channel Inactive" event to downstream according to parent contract (#10303)
@Periecle Periecle deleted the fix/netty-channel-inactive-event-propagation branch January 23, 2024 19:05
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