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 events count limit when set to 0 #2679

Merged
merged 3 commits into from
Dec 27, 2021

Conversation

Bataran
Copy link
Contributor

@Bataran Bataran commented Dec 20, 2021

Which problem is this PR solving?

If span events count limit (OTEL_SPAN_EVENT_COUNT_LIMIT) is set to 0 there should be no events in the span. Current implementation allows adding 1 event when the limit is set to 0.

Fixes #2670

Short description of the changes

Span's addEvent function updated. If the limit is set to 0, it adds log that no event are allowed and returns.

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 16:25
@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 #2679 (b6592f6) into main (f010fa3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2679   +/-   ##
=======================================
  Coverage   92.52%   92.53%           
=======================================
  Files         144      144           
  Lines        5180     5183    +3     
  Branches     1103     1104    +1     
=======================================
+ Hits         4793     4796    +3     
  Misses        387      387           
Impacted Files Coverage Δ
packages/opentelemetry-sdk-trace-base/src/Span.ts 100.00% <100.00%> (ø)

@vmarchaud vmarchaud added the bug Something isn't working label Dec 25, 2021
@dyladan dyladan merged commit 315abae into open-telemetry:main Dec 27, 2021
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 event count limit doesn't work when set to 0
3 participants