-
Notifications
You must be signed in to change notification settings - Fork 446
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
New LogRecord
and Recordable
implementations.
#1766
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1766 +/- ##
==========================================
- Coverage 85.73% 85.71% -0.01%
==========================================
Files 171 171
Lines 5240 5240
==========================================
- Hits 4492 4491 -1
- Misses 748 749 +1
|
LogRecord
and Recordable
implementations.LogRecord
and Recordable
implementations.
740bf23
to
35f1ac8
Compare
Do you think we can keep the existing API intact (maybe renaming to And then the new interface can build the |
Sorry, I'm poor in English and perhaps I didn't make it clear. The For users, we can still use the old |
Thanks for explanation. So to summarise
This looks fine to me. Log Data model is already stable, I don't think LogRecord would change any further, definitely not after log API is also made stable. So, there shouldn't be upgrade issues with users. |
Thanks, I will push another commit later to change the relationship between I also have a idea about the new |
Aren't variable templates part of C++14 ? |
No, it's C++11. See https://en.cppreference.com/w/cpp/compiler_support/11 |
Oh variadic templates :) Not sure if that would look good at public API surface. I would prefer overloaded methods, but would leave it to you. |
e28b065
to
1bb5f7a
Compare
@lalitb Could you please take some time to review this PR again when you have time?The |
1bb5f7a
to
250eb44
Compare
250eb44
to
f5a22e7
Compare
sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h
Outdated
Show resolved
Hide resolved
043030a
to
dbe9b50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have some minor comments. In general looks in good shape. Need to review otlp exporter part to finish the review, will be doing that tomorrow.
dbe9b50
to
878649e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. with few minor comments.
We can wait for couple of days if there are more reviews before merging.
Thanks for the work, it is nicely done :)
878649e
to
5c885ca
Compare
…on#2941 Signed-off-by: owent <[email protected]> Fix `-Werror=suggest-override` and style Signed-off-by: owent <[email protected]> Fix ostream_log_test Signed-off-by: owent <[email protected]> Fix ostream print_value for `AttributeValue` Signed-off-by: owent <[email protected]> New Recordable of logs Signed-off-by: owent <[email protected]> Restore .vscode/launch.json Signed-off-by: owent <[email protected]> Fix warning. Signed-off-by: owent <[email protected]> Fix warnings in maintainer mode and ETW exporter Signed-off-by: owent <[email protected]> Add CHANGELOG Signed-off-by: owent <[email protected]> Allow to move 'nostd::unique_ptr<T>' into `nostd::shared_ptr<T>` Signed-off-by: owent <[email protected]> Do not use `std/type_traits.h` any more. Maybe we should remove this file later. Signed-off-by: owent <[email protected]> Allow to add rvalue into `CircularBuffer` Signed-off-by: owent <[email protected]> Finish new `LogRecord` for exporters. Signed-off-by: owent <[email protected]> Finish unit tests in API and SDK. Exporters are still work in progress. Signed-off-by: owent <[email protected]> New `LogRecord` and `Recordable` implementations. Signed-off-by: WenTao Ou <[email protected]> Restore `nostd::unique_ptr` to `std::unique_ptr` in sdk and exporters. Signed-off-by: WenTao Ou <[email protected]> Fix feedback of comments and useless headers Signed-off-by: WenTao Ou <[email protected]> Optimize if branch in `ReadWriteLogRecord::GetResource` . Signed-off-by: owent <[email protected]>
5c885ca
to
8785f64
Compare
Signed-off-by: WenTao Ou [email protected]
Fixes #1691
Fixes #1689
Changes
There are a lot break changes in this PR.But it's easy to migrate if users do not implement their own Logger and Exporter.
Logger::Log
APIs.name
field are removed now.Thename
field is ognored from v1.4.0.LogRecord
,ReadableLogRecord
,ReadWriteLogRecord
logs::Recordable
to collect data from the all in oneLogRecord
.EmitEvent
function which will be use to implement [Logs API] LoggerProvider changes #1687 and [Logs API] - Logger Changes #1688 in the future.std::unique_ptr<T>
withnostd::unique_ptr<T>
in logs.For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes