Add AttributeLimits, SpanLimits and dropped event/links counting#417
Conversation
Codecov Report
@@ Coverage Diff @@
## main #417 +/- ##
============================================
+ Coverage 94.09% 94.33% +0.23%
- Complexity 720 758 +38
============================================
Files 59 63 +4
Lines 1745 1854 +109
============================================
+ Hits 1642 1749 +107
- Misses 103 105 +2
Continue to review full report at Codecov.
|
bobstrecansky
left a comment
There was a problem hiding this comment.
One question but it's definitely not a blocker. Going to merge this!
| { | ||
| public static function substr(string $value, int $offset, int $length): string | ||
| { | ||
| if (function_exists('mb_substr')) { |
There was a problem hiding this comment.
Can you think of a particular place where mb_substr and mb_strlen wouldn't exist? I can't, but I'm probably a bit jaded here.
There was a problem hiding this comment.
mbstring is a non-default extension (https://www.php.net/manual/en/mbstring.installation.php) while Docker image has it enabled by default.
This check in code could be replaced by the additional requirement in composer.json. But I'm not sure which is better. When the user doesn't have mbstring installed that means the user code doesn't care about Unicode at all. The library would not help.
There was a problem hiding this comment.
Thank you for the context. I think this is sufficient for now; we can most certainly include that in composer.json if we ever decided we wanted to. I like the direction you took.
This PR adds support for Span Limits and common Attribute Limits.
The
Spanclass counts attributes, events and links dropped due to limits. These counters are exported via OTLP.Fixed: Numeric attribute key is interpreted as an integer value which breaks string-key type checks on reading from Attributes.