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

Filter private logs out of external exporters #814

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

leandro-godon
Copy link
Contributor

Goal

Filter out OTel logs with the "emb.private" attribute when exporting to a customer-provided log exporter.

Testing

Modified unit tests. Note that currently there are no logs that are marked as private within the SDK.

@leandro-godon leandro-godon requested a review from a team as a code owner April 29, 2024 12:18
@@ -40,6 +42,10 @@ internal class LogWriterImpl(
builder.setAttribute(embState.attributeKey, appState)
}

if (isPrivate) {
builder.setFixedAttribute(PrivateSpan)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We may want to rename PrivateSpan to Private to avoid confusion here.

Copy link

codecov bot commented Apr 29, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 81.21%. Comparing base (b363e35) to head (a6c89b4).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #814      +/-   ##
==========================================
+ Coverage   81.15%   81.21%   +0.06%     
==========================================
  Files         426      426              
  Lines       11334    11346      +12     
  Branches     1686     1688       +2     
==========================================
+ Hits         9198     9215      +17     
+ Misses       1422     1417       -5     
  Partials      714      714              
Files Coverage Δ
...e/android/embracesdk/arch/destination/LogWriter.kt 100.00% <100.00%> (ø)
...droid/embracesdk/arch/destination/LogWriterImpl.kt 94.73% <100.00%> (+6.50%) ⬆️
...oid/embracesdk/internal/spans/EmbraceExtensions.kt 80.35% <100.00%> (+0.72%) ⬆️
...acesdk/opentelemetry/OpenTelemetryConfiguration.kt 100.00% <100.00%> (ø)
...bracesdk/internal/logs/EmbraceLogRecordExporter.kt 55.55% <71.42%> (+5.55%) ⬆️

... and 7 files with indirect coverage changes

@leandro-godon leandro-godon merged commit caedc4f into master Apr 30, 2024
4 checks passed
@leandro-godon leandro-godon deleted the leandro/filter_private_logs branch April 30, 2024 12:06
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.

None yet

2 participants