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

Remove redundant shutdown check in batchlogprocessor #2514

Conversation

cijothomas
Copy link
Member

The check is already done by the LogProvider.

@cijothomas cijothomas requested a review from a team as a code owner January 15, 2025 02:39
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.9%. Comparing base (9aea826) to head (af3ed12).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2514   +/-   ##
=====================================
  Coverage   77.9%   77.9%           
=====================================
  Files        123     123           
  Lines      22953   22944    -9     
=====================================
- Hits       17881   17879    -2     
+ Misses      5072    5065    -7     

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

@lalitb
Copy link
Member

lalitb commented Jan 15, 2025

So, we don't go with the approach in #2462 - i.e., having is_shutdown check in logger::emit()?

@cijothomas
Copy link
Member Author

So, we don't go with the approach in #2462 - i.e., having is_shutdown check in logger::emit()?

Irrespective of that, this check is redundant, as processor's shutdown() cannot be called without going through provider, which already checks for duplicate shutdown.

@lalitb
Copy link
Member

lalitb commented Jan 15, 2025

Irrespective of that, this check is redundant, as processor's shutdown() cannot be called without going through provider, which already checks for duplicate shutdown.

yes, #2462 does same thing, by removing the is_shutdown flag altogether from the processors and let logger::emit() also check for the flag.

@cijothomas
Copy link
Member Author

Irrespective of that, this check is redundant, as processor's shutdown() cannot be called without going through provider, which already checks for duplicate shutdown.

yes, #2462 does same thing, by removing the is_shutdown flag altogether from the processors and let logger::emit() also check for the flag.

Got it. I'll revisit 2462 again. We discussed this a bit in yesterday's SIG too. I will share more comments/thoughts on that PR.

@cijothomas cijothomas merged commit 1904d4b into open-telemetry:main Jan 15, 2025
21 checks passed
@cijothomas cijothomas deleted the cijothomas/remove-redundant-shutdownche branch January 15, 2025 18:39
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