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

Fix #1417 Change socket mode ping/pong from debug to trace #1421

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

seratch
Copy link
Member

@seratch seratch commented Jan 14, 2025

This pull request resolves #1417

Category (place an x in each of the [ ])

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

@seratch seratch added the project:slack-api-client project:slack-api-client label Jan 14, 2025
@seratch seratch added this to the 1.45.2 milestone Jan 14, 2025
@seratch seratch self-assigned this Jan 14, 2025
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.

Project coverage is 73.16%. Comparing base (253cffc) to head (38344f5).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...i/socket_mode/impl/SocketModeClientJavaWSImpl.java 0.00% 6 Missing ⚠️
...pi/socket_mode/impl/SocketModeClientTyrusImpl.java 0.00% 4 Missing and 2 partials ⚠️
...et_mode/impl/JakartaSocketModeClientTyrusImpl.java 0.00% 4 Missing and 2 partials ⚠️
...va/com/slack/api/socket_mode/SocketModeClient.java 0.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1421      +/-   ##
============================================
- Coverage     73.26%   73.16%   -0.10%     
+ Complexity     4370     4367       -3     
============================================
  Files           474      474              
  Lines         14185    14185              
  Branches       1433     1433              
============================================
- Hits          10393    10379      -14     
- Misses         2947     2962      +15     
+ Partials        845      844       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

Looks good to me 💯

Not sure why the CI is failing 🤔

@bruceadowns
Copy link

Pls also include SocketModeClient::initializeSessionMonitorExecutor()

Comment on lines +155 to 157
if (getLogger().isTraceEnabled()) {
getLogger().trace("Failed to receive a pong message");
}

Choose a reason for hiding this comment

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

Consider making this a warning.

Suggested change
if (getLogger().isTraceEnabled()) {
getLogger().trace("Failed to receive a pong message");
}
getLogger().warn("Failed to receive a pong message");

Copy link
Member Author

Choose a reason for hiding this comment

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

When taking time until successfully connecting, having these at WARN level every 100 milliseconds can be noisy, so we won't change the log level here.

Comment on lines +216 to 218
if (getLogger().isTraceEnabled()) {
getLogger().trace("Failed to receive a pong message: {}", ping);
}

Choose a reason for hiding this comment

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

Consider making this a warning.

Suggested change
if (getLogger().isTraceEnabled()) {
getLogger().trace("Failed to receive a pong message: {}", ping);
}
getLogger().warn("Failed to receive a pong message: {}", ping);

@bruceadowns
Copy link

Not sure why the CI is failing

CI is failing on code coverage because trace log level is not enabled.

@seratch
Copy link
Member Author

seratch commented Jan 14, 2025

Not sure why the CI is failing 🤔

The codecov warning is because there is no test addition with trace-level logging, but I believe it's okay to ignore this time.

initializeSessionMonitorExecutor

Good catch; I will update this PR later

@seratch seratch force-pushed the issue-1417-trace-logging branch from bdf235d to 38344f5 Compare January 14, 2025 22:28
@seratch seratch merged commit 7adea91 into slackapi:main Jan 15, 2025
5 of 6 checks passed
@seratch seratch deleted the issue-1417-trace-logging branch January 15, 2025 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project:slack-api-client project:slack-api-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change socket mode ping/pong from debug to trace
3 participants