-
Notifications
You must be signed in to change notification settings - Fork 821
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(exporter-collector): implement concurrencyLimit option
This adds an option to the collector exporters `concurrencyLimit`. If this is set and the number of export operations is equal to the limit, additional export operations will fail immediately. This should be set in combination with the batch span processor be set such that the concurrency limit would not be reached under "normal" circumstances - only if there is an issue would spans start to be dropped. This helps us cap the amount of memory & sockets used by the exporter if it is not able to keep up with the data it is being provided. This could happen if the local network (e.g. in a browser) or the remote collector are too slow to handle all the activity. If we do not have this cap, and the exporter cannot keep up, resources such as memory and network sockets can be consumed without limit, causing crashes and other undesirable outcomes far worse than losing some telemetry data. This also updates the examples to use `BatchSpanProcessor` as I couldn't really think of any reason why you would want to use SimpleSpanProcessor in combination with the collector exporter.
- Loading branch information
Showing
4 changed files
with
75 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters