-
Notifications
You must be signed in to change notification settings - Fork 186
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
add sdk-config 0.3 support for key/value headers and attributes #1428
base: main
Are you sure you want to change the base?
Conversation
- headers and attributes are now arrays with `key` and `value` elements - headers can optionally contain a `headers_list` element which supports a lower-priority CSV of key/value entries - attributes can optionally contain an `attributes_list` element which supports a lower-priority CSV of key/value entries
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1428 +/- ##
============================================
- Coverage 73.56% 73.15% -0.42%
Complexity 2683 2683
============================================
Files 387 387
Lines 7975 8008 +33
============================================
- Hits 5867 5858 -9
- Misses 2108 2150 +42
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's minor, but could we keep consistency and convert the snake-cased variables? 👼
$headers_list = array_column(array_map(fn ($item) => explode('=', $item), explode(',', $properties['headers_list'] ?? '')), 1, 0); | ||
$headers = array_column($properties['headers'], 'value', 'name') + $headers_list; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be moved into a utility class? It looks to be used in several places 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had an existing class which already does this, so I've updated to use MapParser
src/Config/SDK/ComponentProvider/Logs/LogRecordExporterOtlp.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Tobias Bachert <[email protected]>
key
andvalue
elementsheaders_list
element which supports a lower-priority CSV of key/value entriesattributes_list
element which supports a lower-priority CSV of key/value entriesRelated: #1423