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

fix: span attribute count and value limits (#2671) #2678

Merged
merged 6 commits into from
Jan 12, 2022

Conversation

Bataran
Copy link
Contributor

@Bataran Bataran commented Dec 20, 2021

Which problem is this PR solving?

In case where span attribute count limit (OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT) is explicitly set to its default value (128) and general attribute count limit (OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT) is set then the general limit was used. By the specs this is wrong and the model specific limit should be used instead.

Fixes #2671

Short description of the changes

There is a new Utility function reconfigureLimits(config: TracerConfig) which must be called before setting any default values to the config provided by a user. The function checks (based on the config provided by the user) if the model specific limits should be assigned or not.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Unit tests have been added

@Bataran Bataran requested a review from a team December 20, 2021 09:00
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 20, 2021

CLA Signed

The committers are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Dec 20, 2021

Codecov Report

Merging #2678 (44a3d6b) into main (82e39c4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2678   +/-   ##
=======================================
  Coverage   93.03%   93.03%           
=======================================
  Files         155      155           
  Lines        5368     5371    +3     
  Branches     1131     1131           
=======================================
+ Hits         4994     4997    +3     
  Misses        374      374           
Impacted Files Coverage Δ
...elemetry-sdk-trace-base/src/BasicTracerProvider.ts 94.49% <100.00%> (+0.05%) ⬆️
...ckages/opentelemetry-sdk-trace-base/src/utility.ts 100.00% <100.00%> (ø)

@legendecas
Copy link
Member

@Bataran it's almost there 🚀. Would you please update the PR since CI is complaining of code styles? Thanks!

@legendecas legendecas merged commit d315b0a into open-telemetry:main Jan 12, 2022
rauno56 added a commit to rauno56/opentelemetry-js that referenced this pull request Jan 14, 2022
…n-telemetry#2678)


Co-authored-by: Rauno Viskus <Rauno56@users.noreply.github.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
Co-authored-by: legendecas <legendecas@gmail.com>
@dyladan dyladan added the bug Something isn't working label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Span attribute count limit doesn't work by the specification
6 participants