Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

feat: make gzip as default content encoding type #433

Merged
merged 10 commits into from May 29, 2020
Merged

feat: make gzip as default content encoding type #433

merged 10 commits into from May 29, 2020

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented May 26, 2020

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

feat: make gzip as default content encoding type

💡 Motivation and Context

compress the content of the payload before sending it over the network, so saving some data.

💚 How did you test it?

running and tests passed.
serialization layer is not affected and so didn't need extra tests.
the response content is still a raw JSON, no need to change that as we only get a very small response when there's a 4xx error for example.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing

🔮 Next steps

CI error is due to missing NDK on LGTM analyzer.
https://discuss.lgtm.com/t/android-ndk-v21-1-6352462-is-not-available/2910

@codecov-commenter
Copy link

codecov-commenter commented May 26, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@cc07701). Click here to learn what that means.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #433   +/-   ##
=========================================
  Coverage          ?   60.26%           
  Complexity        ?      816           
=========================================
  Files             ?       93           
  Lines             ?     3727           
  Branches          ?      359           
=========================================
  Hits              ?     2246           
  Misses            ?     1328           
  Partials          ?      153           
Impacted Files Coverage Δ Complexity Δ
...n/java/io/sentry/core/transport/HttpTransport.java 80.76% <70.73%> (ø) 34.00 <5.00> (?)
...java/io/sentry/core/transport/TransportResult.java 91.66% <100.00%> (ø) 3.00 <1.00> (?)
.../io/sentry/core/transport/CurrentDateProvider.java 66.66% <0.00%> (ø) 2.00% <0.00%> (?%)
...re/src/main/java/io/sentry/core/protocol/User.java 95.12% <0.00%> (ø) 18.00% <0.00%> (?%)
...try-core/src/main/java/io/sentry/core/Session.java 98.64% <0.00%> (ø) 27.00% <0.00%> (?%)
...in/java/io/sentry/core/hints/SessionStartHint.java 100.00% <0.00%> (ø) 1.00% <0.00%> (?%)
...in/java/io/sentry/core/AsyncConnectionFactory.java 100.00% <0.00%> (ø) 1.00% <0.00%> (?%)
...main/java/io/sentry/core/util/ApplyScopeUtils.java 100.00% <0.00%> (ø) 3.00% <0.00%> (?%)
...re/src/main/java/io/sentry/core/util/LogUtils.java 70.00% <0.00%> (ø) 4.00% <0.00%> (?%)
...ore/src/main/java/io/sentry/core/util/Objects.java 100.00% <0.00%> (ø) 2.00% <0.00%> (?%)
... and 85 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc07701...cbd0140. Read the comment docs.

Copy link

@rhcarvalho rhcarvalho left a comment

Choose a reason for hiding this comment

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

Nice removal of some code duplication there!

I just have a suggestion for consideration; will leave it up to another reviewer to approve.

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

Looks pretty good. Still I have a few comments :)

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM

@marandaneto marandaneto merged commit 0e61fde into getsentry:master May 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants