embrace-io / embrace-apple-sdk

Embrace's Swift SDK built on OpenTelemetry
https://embrace.io/docs/ios/
Apache License 2.0
117 stars 11 forks source link

Improving network body capture rules #112

Closed NachoEmbrace closed 3 weeks ago

NachoEmbrace commented 3 weeks ago

So it's not needed to include the https:// prefix when creating the rules. This PR makes it so the prefix gets ignored when doing the regex matching.

github-actions[bot] commented 3 weeks ago

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

github-actions[bot] commented 3 weeks ago
Warnings
:warning: No CHANGELOG entry added.
:warning: **Tests/EmbraceCoreTests/Capture/Network/DefaultURLSessionTaskHandlerTests.swift#L197** - Prefer non-optional `Data(_:)` initializer when converting `String` to `Data` (`non_optional_string_data_conversion`)

Generated by :no_entry_sign: Danger Swift against a8f890d5ed07fe30fa1cd13c33a2ad6d88fbf8f6

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.02%. Comparing base (b2da5ac) to head (a8f890d). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112/graphs/tree.svg?width=650&height=150&src=pr&token=R3KMG2Ar52&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io)](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io) ```diff @@ Coverage Diff @@ ## main #112 +/- ## ========================================== + Coverage 91.95% 92.02% +0.07% ========================================== Files 408 410 +2 Lines 26457 26486 +29 ========================================== + Hits 24329 24375 +46 + Misses 2128 2111 -17 ``` | [Files with missing lines](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io) | Coverage Δ | | |---|---|---| | [...ceCommonInternal/Protocols/DispatchableQueue.swift](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112?src=pr&el=tree&filepath=Sources%2FEmbraceCommonInternal%2FProtocols%2FDispatchableQueue.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io#diff-U291cmNlcy9FbWJyYWNlQ29tbW9uSW50ZXJuYWwvUHJvdG9jb2xzL0Rpc3BhdGNoYWJsZVF1ZXVlLnN3aWZ0) | `100.00% <100.00%> (ø)` | | | [Sources/EmbraceConfigInternal/EmbraceConfig.swift](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112?src=pr&el=tree&filepath=Sources%2FEmbraceConfigInternal%2FEmbraceConfig.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io#diff-U291cmNlcy9FbWJyYWNlQ29uZmlnSW50ZXJuYWwvRW1icmFjZUNvbmZpZy5zd2lmdA==) | `93.84% <100.00%> (ø)` | | | [...workPayloadCapture/URLSessionTaskCaptureRule.swift](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112?src=pr&el=tree&filepath=Sources%2FEmbraceCore%2FCapture%2FNetwork%2FNetworkPayloadCapture%2FURLSessionTaskCaptureRule.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io#diff-U291cmNlcy9FbWJyYWNlQ29yZS9DYXB0dXJlL05ldHdvcmsvTmV0d29ya1BheWxvYWRDYXB0dXJlL1VSTFNlc3Npb25UYXNrQ2FwdHVyZVJ1bGUuc3dpZnQ=) | `89.36% <100.00%> (+0.72%)` | :arrow_up: | | [...ceCore/Capture/Network/URLSessionTaskHandler.swift](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112?src=pr&el=tree&filepath=Sources%2FEmbraceCore%2FCapture%2FNetwork%2FURLSessionTaskHandler.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io#diff-U291cmNlcy9FbWJyYWNlQ29yZS9DYXB0dXJlL05ldHdvcmsvVVJMU2Vzc2lvblRhc2tIYW5kbGVyLnN3aWZ0) | `97.70% <100.00%> (ø)` | | | [...mbraceConfigInternalTests/EmbraceConfigTests.swift](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112?src=pr&el=tree&filepath=Tests%2FEmbraceConfigInternalTests%2FEmbraceConfigTests.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io#diff-VGVzdHMvRW1icmFjZUNvbmZpZ0ludGVybmFsVGVzdHMvRW1icmFjZUNvbmZpZ1Rlc3RzLnN3aWZ0) | `100.00% <100.00%> (ø)` | | | [...re/Network/DefaultURLSessionTaskHandlerTests.swift](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112?src=pr&el=tree&filepath=Tests%2FEmbraceCoreTests%2FCapture%2FNetwork%2FDefaultURLSessionTaskHandlerTests.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io#diff-VGVzdHMvRW1icmFjZUNvcmVUZXN0cy9DYXB0dXJlL05ldHdvcmsvRGVmYXVsdFVSTFNlc3Npb25UYXNrSGFuZGxlclRlc3RzLnN3aWZ0) | `95.34% <100.00%> (ø)` | | | [...ayloadCapture/URLSessionTaskCaptureRuleTests.swift](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112?src=pr&el=tree&filepath=Tests%2FEmbraceCoreTests%2FCapture%2FNetwork%2FNetworkPayloadCapture%2FURLSessionTaskCaptureRuleTests.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io#diff-VGVzdHMvRW1icmFjZUNvcmVUZXN0cy9DYXB0dXJlL05ldHdvcmsvTmV0d29ya1BheWxvYWRDYXB0dXJlL1VSTFNlc3Npb25UYXNrQ2FwdHVyZVJ1bGVUZXN0cy5zd2lmdA==) | `100.00% <100.00%> (ø)` | | | [Tests/TestSupport/Mocks/MockQueue.swift](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112?src=pr&el=tree&filepath=Tests%2FTestSupport%2FMocks%2FMockQueue.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io#diff-VGVzdHMvVGVzdFN1cHBvcnQvTW9ja3MvTW9ja1F1ZXVlLnN3aWZ0) | `100.00% <100.00%> (ø)` | | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/embrace-io/embrace-apple-sdk/pull/112/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=embrace-io)