Skip to content

Conversation

aliu39
Copy link
Member

@aliu39 aliu39 commented Jun 18, 2025

Follow up on #16485 (review)

Instead of tracking the evaluated feature flags in a global weakmap, we can directly check the span attributes by converting to JSON.

@aliu39 aliu39 marked this pull request as ready for review June 18, 2025 21:58
@aliu39 aliu39 requested review from a team, AbhiPrasad and chargome and removed request for a team June 18, 2025 21:58
@aliu39
Copy link
Member Author

aliu39 commented Jun 18, 2025

@chargome I'm curious if the team has concerns on performance? If a customer is repeatedly evaluating 100s of flags and calling addFeatureFlag each time, should we worry about spanToJSON being too expensive?

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We previously did have some issues with spanToJSON - but the performance should be much better now.

Might be nice to benchmark - you can probably test server-side with profiling a node app: https://nodejs.org/en/learn/getting-started/profiling

@aliu39
Copy link
Member Author

aliu39 commented Jun 18, 2025

Talked with @AbhiPrasad , closing for now until I get more bandwidth to play with benchmarking experiments. The map implementation should be fine for releasing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants