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(otlp-exporter-base): decrease default concurrency limit #4211

Conversation

pichlermarc
Copy link
Member

Which problem is this PR solving?

See #4204, reduces the export limit to 30 from infinity. With default settings in metrics with a periodic exporting metric reader this would equate to 30 minutes of collector unavailability until metrics are dropped; in traces and logs, this would equate to 2.5min of unvailability (or shorter if reaching the BatchSpanProcessor limit).

The limit of 30 may be a bit low; I'm happy to change the limit based on suggestions on this PR 🙂

Fixes #4204

Type of change

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

@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Merging #4211 (cc17e5d) into main (6be10fb) will increase coverage by 0.01%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4211      +/-   ##
==========================================
+ Coverage   92.20%   92.21%   +0.01%     
==========================================
  Files         332      332              
  Lines        9447     9447              
  Branches     2003     2003              
==========================================
+ Hits         8711     8712       +1     
+ Misses        736      735       -1     
Files Coverage Δ
...ackages/otlp-exporter-base/src/OTLPExporterBase.ts 95.23% <100.00%> (ø)

... and 1 file with indirect coverage changes

@vijayaggarwal
Copy link

@pichlermarc Basis your calculations, 30 seems a very reasonable default value to me. In my opinion, holding large amount of data in RAM is not advisable for the agent as it can cause memory spikes and that can have adverse impact on application performance/stability.

For a service getting 10k requests/min, 25k traces will get generated in 2.5 min. Assuming each trace takes a modest 5kb memory (10 spans per trace * 500 bytes per span), the queue can consume upto 125mb.

@pichlermarc pichlermarc marked this pull request as ready for review November 9, 2023 13:56
@pichlermarc pichlermarc requested a review from a team November 9, 2023 13:56
@pichlermarc pichlermarc added bug Something isn't working priority:p1 Bugs which cause problems in end-user applications such as crashes, data inconsistencies, etc pkg:otlp-exporter-base labels Nov 14, 2023
@legendecas legendecas merged commit af4f7a9 into open-telemetry:main Dec 13, 2023
20 checks passed
@pichlermarc pichlermarc deleted the fix/exporter-concurrency-limit branch December 13, 2023 08:53
dyladan added a commit that referenced this pull request Dec 13, 2023
* Add Trent to approvers (#4311)

* chore(renovate): require dashboard approval for lerna updates (#4276)

* chore(ci): install semver globally to speed up "peer-api" workflow (#4270)

Closes: #4242

* fix(ci): remove token setup via environment variable from .npmrc (#4329)

* fix(instrumentation-http): resume responses when there is no response listener

Fixes a memory leak where unhandled response bodies pile up in node 20

* feat: add script to update changelogs on release preparation (#4315)

* feat: add script to update changelogs on releases

* fix: address comments

* Apply suggestions from code review

Co-authored-by: Trent Mick <trentm@gmail.com>

* fix: apply suggestions from code review

* fix: use packageJson.version instead of version

---------

Co-authored-by: Trent Mick <trentm@gmail.com>

* Fix event name

* test: make rawRequest HTTP-compliant

* Add node 20 to test matrix

* Enable old hash functions on 20

* Fix esm handling for iitm node 20

* Use err.code to make test more reliable

* Changelog

* nit: single import

* Remove unused files

* Add v20 to supported runtimes

* ci: add npm cache in actions/setup-node (#4271)

* feat(sdk-logs): add droppedAttributesCount field to ReadableLogRecord (#4289)

* feat(sdk-logs): add droppedAttributesCount field to ReadableLogRecord

* chore: check droppedAttributesCount value in test case

* feat(otlp-transformer): make toLogRecord() use ReadableLogRecord.droppedAttributesCount

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* fix(api-logs): allow passing in TimeInput for LogRecord (#4345)

* fix: allow passing in TimeInput for LogRecord

* chore: update changelog

* fix: programmatic url and headers take precedence in metric exporters… (#4334)

* fix: programmatic url and headers take precedence in metric exporters (#2370)

* chore: adjust grpc exporter metrics test

* chore(changelog): update changelog

* fix(instrumentation-http): do not mutate given headers object for outgoing http requests (#4346)

Fixes: open-telemetry/opentelemetry-js-contrib#1609

* chore(deps): update actions/stale action to v9 (#4353)

* fix(deps): update dependency import-in-the-middle to v1.6.0 (#4357)

* chore(deps): update all patch versions (#4306)

* chore(ci): use node 20 in lint workflow (#4359)

* chore(deps): update dependency linkinator to v6 (#4237)

* fix(otlp-exporter-base): decrease default concurrency limit to 30 (#4211)

* fix(otlp-exporter-base): decrease concurrency limit to 30

* fix(changelog): add changelog entry

* chore(deps): use actions/checkout >4 instead of 4.0.0 exactly (#4361)

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: strivly <133362191+strivly@users.noreply.github.com>
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: lyzlisa <34400837+lyzlisa@users.noreply.github.com>
Co-authored-by: Hyun Oh <hyunnoh01@gmail.com>
Co-authored-by: Siim Kallas <siimkallas@gmail.com>
Co-authored-by: Vladimir Adamić <441333+Vunovati@users.noreply.github.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
rdeavila94 pushed a commit to rdeavila94/opentelemetry-js that referenced this pull request Jan 3, 2024
…en-telemetry#4211)

* fix(otlp-exporter-base): decrease concurrency limit to 30

* fix(changelog): add changelog entry
Zirak pushed a commit to Zirak/opentelemetry-js that referenced this pull request Sep 14, 2024
…en-telemetry#4211)

* fix(otlp-exporter-base): decrease concurrency limit to 30

* fix(changelog): add changelog entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:otlp-exporter-base priority:p1 Bugs which cause problems in end-user applications such as crashes, data inconsistencies, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Application crash caused by infinite concurrencyLimit during extended collector unavailability
3 participants