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

Add log level for internal log of sdk #1147

Merged
merged 4 commits into from
Jan 4, 2022

Conversation

owent
Copy link
Member

@owent owent commented Dec 17, 2021

Signed-off-by: owentou owentou@tencent.com

Fixes #1138

Changes

  • Add log level for internal log of sdk
  • Fix document for internal log of sdk
  • Fix crash problem when any provider is destroyed after internal log handle(Both are signaltons).

    It may call OTEL_INTERNAL_LOG_*(...) and will crash.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@owent owent requested a review from a team December 17, 2021 08:44
@codecov
Copy link

codecov bot commented Dec 17, 2021

Codecov Report

Merging #1147 (e73df79) into main (4bffa63) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1147      +/-   ##
==========================================
+ Coverage   93.26%   93.28%   +0.02%     
==========================================
  Files         173      174       +1     
  Lines        6362     6391      +29     
==========================================
+ Hits         5933     5961      +28     
- Misses        429      430       +1     
Impacted Files Coverage Δ
...lude/opentelemetry/sdk/common/global_log_handler.h 83.34% <100.00%> (+3.34%) ⬆️
sdk/test/common/global_log_handle_test.cc 100.00% <100.00%> (ø)
sdk/src/trace/batch_span_processor.cc 90.48% <0.00%> (-1.19%) ⬇️

@owent owent force-pushed the add_internal_log_level branch 2 times, most recently from 278707f to 60826d9 Compare December 22, 2021 06:50
@owent owent force-pushed the add_internal_log_level branch from 6bf6668 to 4f5187e Compare December 23, 2021 05:55
Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

Thanks

@@ -16,7 +17,7 @@
#define OTEL_INTERNAL_LOG_LEVEL_DEBUG 3 // to be disabled in release

#ifndef OTEL_INTERNAL_LOG_LEVEL
# define OTEL_INTERNAL_LOG_LEVEL OTEL_INTERNAL_LOG_LEVEL_WARN // ERROR and WARN
# define OTEL_INTERNAL_LOG_LEVEL OTEL_INTERNAL_LOG_LEVEL_DEBUG // ERROR and WARN
Copy link
Member

Choose a reason for hiding this comment

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

nit - change the comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

nit - change the comment?

done

@lalitb
Copy link
Member

lalitb commented Jan 3, 2022

@owent - this looks good to merge. Would you rebase it to the main branch? Thanks.

owent added 4 commits January 4, 2022 10:15
+ Fix document for internal log of sdk
+ Fix crash problem when any provider is destroyed after internal log handle.

Signed-off-by: owentou <owentou@tencent.com>
Signed-off-by: owentou <owentou@tencent.com>
Signed-off-by: owentou <owentou@tencent.com>
Signed-off-by: owentou <owentou@tencent.com>
@owent owent force-pushed the add_internal_log_level branch from 9cb7f0a to e73df79 Compare January 4, 2022 02:15
@owent
Copy link
Member Author

owent commented Jan 4, 2022

@owent - this looks good to merge. Would you rebase it to the main branch? Thanks.

Done

@lalitb lalitb merged commit baab88f into open-telemetry:main Jan 4, 2022
@owent owent deleted the add_internal_log_level branch January 4, 2022 04:08
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.

Could internal log level be set by runtime?
2 participants