chore: Add doc and rename function for flushing strategy by lym953 · Pull Request #740 · DataDog/datadog-lambda-extension

lym953

@lym953 lym953 marked this pull request as ready for review

July 11, 2025 20:43

astuyve

@lym953 lym953 deleted the yiming.luo/flush-strategy-doc branch

July 21, 2025 15:45

duncanpharvey pushed a commit that referenced this pull request

Mar 10, 2026
# Motivation

It took me quite some effort to understand flushing strategies. I want
to make it easier to understand for me and future developers.

# This PR
Tries to make flushing strategy code more readable:
1. Add/move comments
2. Create an enum `ConcreteFlushStrategy`, which doesn't contain
`Default` because it is required to be resolved to a concrete strategy
3. Rename `should_adapt` to `evaluate_concrete_strategy()`

# To reviewers
There are still a few things I don't understand, which are marked with
`TODO`. Appreciate explanation!
Also correct me if any comment I added is wrong.