DataDog / dd-trace-php

Datadog PHP Clients
https://docs.datadoghq.com/tracing/setup/php
Other
481 stars 149 forks source link

Ensure the msgpack contents include only valid utf8 #2698

Closed bwoebi closed 3 weeks ago

bwoebi commented 3 weeks ago

Ensure no utf8 is contained in msgpack strings.

The agent would properly sanitize this away, but the sidecar is not. All traces containing a single invalid utf-8 sequence were dropped.

codecov-commenter commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 77.96%. Comparing base (c5f2dcb) to head (f91f0db).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698/graphs/tree.svg?width=650&height=150&src=pr&token=eXio8H7vwF&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog)](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) ```diff @@ Coverage Diff @@ ## master #2698 +/- ## ============================================ - Coverage 77.96% 77.96% -0.01% Complexity 2212 2212 ============================================ Files 227 227 Lines 26551 26559 +8 Branches 988 988 ============================================ + Hits 20701 20707 +6 - Misses 5324 5326 +2 Partials 526 526 ``` | [Flag](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [appsec-extension](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `69.13% <ø> (ø)` | | | [tracer-extension](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `78.85% <72.72%> (-0.01%)` | :arrow_down: | | [tracer-php](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `80.52% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [ext/serializer.c](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698?src=pr&el=tree&filepath=ext%2Fserializer.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-ZXh0L3NlcmlhbGl6ZXIuYw==) | `82.12% <72.72%> (-0.06%)` | :arrow_down: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). Last update [c5f2dcb...f91f0db](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2698?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog).
pr-commenter[bot] commented 3 weeks ago

Benchmarks

Benchmark execution time: 2024-06-08 16:21:37

Comparing candidate commit f91f0dbcc4b1294acb0e269b5bf6ae26a891782f in PR branch bob/fix-utf8-msgpack with baseline commit c5f2dcb3faec360227837310221040ce6208e082 in branch master.

Found 3 performance improvements and 5 performance regressions! Performance is the same for 170 metrics, 0 unstable metrics.

scenario:MessagePackSerializationBench/benchMessagePackSerialization

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

scenario:PDOBench/benchPDOBaseline-opcache

scenario:PDOBench/benchPDOOverhead

scenario:PDOBench/benchPDOOverhead-opcache

scenario:SamplingRuleMatchingBench/benchRegexMatching1

scenario:SamplingRuleMatchingBench/benchRegexMatching2

scenario:SamplingRuleMatchingBench/benchRegexMatching3