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

Adding new Logger:log() method #1005

Merged
merged 4 commits into from
Sep 30, 2021
Merged

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Sep 30, 2021

Changes

This is to add the Logger: Log() method for the below use-case:

  Properties attribs = {{"attrib1", 1}, {"attrib2", 2}};
  logger.log(severity, name, attribs);

where Properties class implements common::KeyValueIterable.

Similar method is supported by Traccer::StartSpan():

nostd::shared_ptr<Span> StartSpan(nostd::string_view name,
const common::KeyValueIterable &attributes,
const StartSpanOptions &options = {}) noexcept
{
return this->StartSpan(name, attributes, NullSpanContext(), options);
}

Also, a minor change to use full tracer namespace in logger sdk, in order to avoid including unnecessary tracer headers for logger instrumentation.

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

@lalitb lalitb requested a review from a team September 30, 2021 04:52
@codecov
Copy link

codecov bot commented Sep 30, 2021

Codecov Report

Merging #1005 (e6c8856) into main (21a441e) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1005      +/-   ##
==========================================
+ Coverage   95.40%   95.41%   +0.02%     
==========================================
  Files         161      161              
  Lines        6833     6833              
==========================================
+ Hits         6518     6519       +1     
+ Misses        315      314       -1     
Impacted Files Coverage Δ
...include/opentelemetry/sdk/common/circular_buffer.h 100.00% <0.00%> (+2.09%) ⬆️

@lalitb lalitb merged commit 4c61f7b into open-telemetry:main Sep 30, 2021
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.

3 participants