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

Remove the population of emb.type from schema attributes #931

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

bidetofevil
Copy link
Collaborator

@bidetofevil bidetofevil commented Jun 7, 2024

Goal

Remove the population emb.type via an object's schema attributes. Instead, do it when the schema is being processed, which is already being done for spans so that it can't be overwritten by users who have a reference to the span object.

Correspondingly, changed where it's populated for logs and span events on the session span as well, which are the two other places that reads schema attributes.

Testing

Fixed unit tests looking at DataSource *Data objects' attributes for the emb.type, and instead look at the schema itself to check right value. Integration test correctly check the attributes and therefore are still passing.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @bidetofevil and the rest of your teammates on Graphite Graphite

@bidetofevil bidetofevil marked this pull request as ready for review June 7, 2024 05:32
@bidetofevil bidetofevil requested a review from a team as a code owner June 7, 2024 05:32
@bidetofevil bidetofevil requested a review from fractalwrench June 7, 2024 05:32
Copy link

codecov bot commented Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.93%. Comparing base (bca00d2) to head (137875c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #931      +/-   ##
==========================================
- Coverage   80.96%   80.93%   -0.04%     
==========================================
  Files         438      438              
  Lines       11712    11714       +2     
  Branches     1790     1790              
==========================================
- Hits         9483     9481       -2     
- Misses       1442     1446       +4     
  Partials      787      787              
Files Coverage Δ
...droid/embracesdk/arch/destination/LogWriterImpl.kt 95.23% <100.00%> (+0.50%) ⬆️
...brace/android/embracesdk/arch/schema/SchemaType.kt 80.10% <100.00%> (ø)
...mbracesdk/internal/spans/CurrentSessionSpanImpl.kt 88.23% <100.00%> (ø)

... and 1 file with indirect coverage changes

Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

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

LGTM

@bidetofevil bidetofevil merged commit ca3da94 into master Jun 7, 2024
4 checks passed
@bidetofevil bidetofevil deleted the hho/embtype-population branch June 7, 2024 16:02
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.

2 participants