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

Changing the log levels in error scenarios #6832

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vidyadharamurthy
Copy link

No description provided.

@vidyadharamurthy vidyadharamurthy requested a review from a team as a code owner October 29, 2024 08:52
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@740dd14). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6832   +/-   ##
=======================================
  Coverage        ?   90.51%           
  Complexity      ?     6600           
=======================================
  Files           ?      731           
  Lines           ?    19736           
  Branches        ?     1936           
=======================================
  Hits            ?    17865           
  Misses          ?     1280           
  Partials        ?      591           

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

@vidyadharamurthy
Copy link
Author

@jkwatson - Request your review

@Test
void extract_null_spanctx() {
SpanContext spanContext = tracerShim.extract(Format.Builtin.TEXT_MAP, null);
assertThat(spanContext).isNull();
Copy link
Member

Choose a reason for hiding this comment

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

Given that this PR only changes the log level, is this test trying to add missing coverage for existing behavior? Or verify logs are emitted at the intended level?

If the latter, I suggest we skip this. We do have test tooling to verify log messages (for example), but asserting the log level seems rather specific.

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

wdyt of using ApiUsageLogger instead? (though I'm ok with this PR since it only affects opentracing-shim)

@jack-berg
Copy link
Member

wdyt of using ApiUsageLogger instead? (though I'm ok with this PR since it only affects opentracing-shim)

ApiUsageLogger logs messages with an AssertionError, which would be pretty noisy and hard miss, especially if logged at the warning level as proposed in this PR.

I'm not opposed to it since I think that anytime one of these things occurs it indicates that some instrumentation is misusing the API, but just wanted to call it out.

@trask
Copy link
Member

trask commented Nov 8, 2024

ApiUsageLogger logs messages with an AssertionError, which would be pretty noisy and hard miss, especially if logged at the warning level as proposed in this PR.

ah, I didn't even see that ApiUsageLogger takes an optional level, it doesn't look like we ever use that method and only ever use the default (FINEST)

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.

4 participants