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

Fix #1081 #1082

Merged
merged 3 commits into from
Nov 23, 2021
Merged

Fix #1081 #1082

merged 3 commits into from
Nov 23, 2021

Conversation

owent
Copy link
Member

@owent owent commented Nov 21, 2021

Signed-off-by: owent admin@owent.net

Fixes #1081

Changes

  • Using opentelemetry::sdk::resource::Resource::Create to inherit data from default resource and ResourceDetector.
  • Add unit test for OtlpLogRecordable

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 November 21, 2021 12:32
@codecov
Copy link

codecov bot commented Nov 21, 2021

Codecov Report

Merging #1082 (934ee0d) into main (0a924fb) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1082   +/-   ##
=======================================
  Coverage   94.41%   94.41%           
=======================================
  Files         158      158           
  Lines        6077     6077           
=======================================
  Hits         5737     5737           
  Misses        340      340           

return private_resource_;
proto::resource::v1::Resource proto;
OtlpRecordableUtils::PopulateAttribute(
&proto, opentelemetry::sdk::resource::Resource::Create(resource_attributes_));
Copy link
Member

Choose a reason for hiding this comment

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

This is fine for now. But the actual fix should be the improvement in LoggerProvider, to let the resources and instrumentation library passed through it ( similar to what we do with TracerProvider). I will create an issue for the improvements.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree strongly. I could help to do this if there is any need

Copy link
Member

@lalitb lalitb Nov 23, 2021

Choose a reason for hiding this comment

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

Thanks. We can merge this PR. Meanwhile, have added #1086 if you would like to pick it up.

exporters/otlp/test/otlp_log_recordable_test.cc Outdated Show resolved Hide resolved
exporters/otlp/test/otlp_log_recordable_test.cc Outdated Show resolved Hide resolved
} // namespace exporter
OPENTELEMETRY_END_NAMESPACE

#endif
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding the recordable tests.

owent and others added 3 commits November 23, 2021 10:18
Signed-off-by: owent <admin@owent.net>
Signed-off-by: owent <admin@owent.net>
Signed-off-by: owentou <owentou@tencent.com>
@ThomsonTan ThomsonTan merged commit caade51 into open-telemetry:main Nov 23, 2021
@owent owent deleted the fix_1081 branch November 24, 2021 07:57
@lalitb lalitb mentioned this pull request Mar 22, 2022
3 tasks
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.

Default resource attributes and attributes in OTEL_RESOURCE_ATTRIBUTES are missing when using Otlp*LogExporter
3 participants