Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

brettmc
Copy link
Collaborator

@brettmc brettmc commented Nov 7, 2024

  • 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

Related: #1423

- 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
@brettmc brettmc requested a review from a team as a code owner November 7, 2024 12:55
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 41 lines in your changes missing coverage. Please review.

Project coverage is 73.15%. Comparing base (1aae9dd) to head (def56f1).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
.../Config/SDK/ComponentProvider/OpenTelemetrySdk.php 0.00% 14 Missing ⚠️
...K/ComponentProvider/Logs/LogRecordExporterOtlp.php 0.00% 9 Missing ⚠️
...K/ComponentProvider/Metrics/MetricExporterOtlp.php 0.00% 9 Missing ⚠️
...g/SDK/ComponentProvider/Trace/SpanExporterOtlp.php 0.00% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
8.1 ?
8.2 ?
8.3 73.15% <0.00%> (-0.35%) ⬇️
8.4 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...K/ComponentProvider/Logs/LogRecordExporterOtlp.php 0.00% <0.00%> (ø)
...K/ComponentProvider/Metrics/MetricExporterOtlp.php 0.00% <0.00%> (ø)
...g/SDK/ComponentProvider/Trace/SpanExporterOtlp.php 0.00% <0.00%> (ø)
.../Config/SDK/ComponentProvider/OpenTelemetrySdk.php 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

Copy link
Contributor

@ChrisLightfootWild ChrisLightfootWild left a 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? 👼

Comment on lines 44 to 45
$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;
Copy link
Contributor

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 🤔

Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants