Skip to content

Commit

Permalink
pass ignored boolean to should_sample
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnmil committed Jan 15, 2025
1 parent 2876f80 commit c81950a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## [3.3.0] 2025-01-07
### Added
- Added support for down-sampling via Scout configuration.
- Sample rates can be set globally, for specific jobs/endpoints, or with wildcard selectors.
- Sample rates can be set globally or for specific jobs/endpoints
- Check out our [documentation](https://scoutapm.com/docs/python/configuration#sampling) for more information and example usage.

## [3.2.0] 2024-09-12
Expand Down
6 changes: 2 additions & 4 deletions src/scout_apm/core/tracked_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,8 @@ def finish(self):
self.end_time = dt.datetime.now(dt.timezone.utc)

if self.is_real_request:
if (
not self.is_ignored()
and not self.sent
and self.get_sampler().should_sample(self.operation)
if not self.sent and self.get_sampler().should_sample(
self.operation, self.is_ignored()
):
self.tag("mem_delta", self._get_mem_delta())
self.sent = True
Expand Down

0 comments on commit c81950a

Please sign in to comment.