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

Cleanup/fix context package #711

Merged
merged 14 commits into from
Jun 16, 2022

Conversation

Nevay
Copy link
Contributor

@Nevay Nevay commented Jun 15, 2022

Removed:
Context::withValue(): Semi-broken due to creation of hidden scope
Context::detach(): Same functionality as ScopeInterface::detach()
Context::attach(): Same functionality as Context::activate()

Context::getValue(): Can be removed? Users will use class-specific ::fromContext() / ::getCurrrent() methods instead of this method anyways?

Changes:
Context and ContextKey: Changed to final to reduce scope / allow addition of new methods in the future without breaking backwards compatibility.
ArrayAccessGetterSetter: Resolves issues with case-insensitive keys and preserves casing as recommended by spec.

@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #711 (72e3de3) into main (e728c53) will decrease coverage by 1.03%.
The diff coverage is 43.57%.

❗ Current head 72e3de3 differs from pull request most recent head b6ba299. Consider uploading reports for the commit b6ba299 to get more accurate results

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #711      +/-   ##
============================================
- Coverage     83.82%   82.78%   -1.04%     
- Complexity     1233     1241       +8     
============================================
  Files           138      139       +1     
  Lines          2980     3033      +53     
============================================
+ Hits           2498     2511      +13     
- Misses          482      522      +40     
Flag Coverage Δ
7.4 82.78% <43.57%> (-1.05%) ⬇️
8.0 82.83% <43.57%> (-1.04%) ⬇️
8.1 82.83% <43.57%> (-1.04%) ⬇️

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

Impacted Files Coverage Δ
src/API/Baggage/BaggageContextKey.php 0.00% <ø> (ø)
src/API/Trace/SpanContext.php 82.92% <0.00%> (-4.26%) ⬇️
src/API/Trace/SpanContextKey.php 0.00% <ø> (ø)
src/Context/ContextKey.php 100.00% <ø> (ø)
...ation/SanitizeCombinedHeadersPropagationGetter.php 0.00% <0.00%> (ø)
src/Context/Propagation/TextMapPropagator.php 0.00% <0.00%> (ø)
src/SDK/Common/Exception/StackTraceFormatter.php 0.00% <0.00%> (ø)
...c/API/Trace/Propagation/TraceContextPropagator.php 100.00% <100.00%> (ø)
src/API/Trace/TraceState.php 100.00% <100.00%> (ø)
src/Context/Context.php 76.66% <100.00%> (-6.27%) ⬇️
... and 5 more

Continue to review full report at Codecov.

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

Revert after introducing ContextInterface?
@bobstrecansky bobstrecansky merged commit a22f9f1 into open-telemetry:main Jun 16, 2022
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.

None yet

3 participants