Skip to content

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Sep 24, 2024

This came up in a discussion with @s1gr1d: The getTraceData and getTraceMetaTags functions returned data, even if the SDK was disabled entirely (enabled: false). These APIs are publicly exposed and users probably call them without being aware of this limitation (as well as us in our meta framework SDKs). This PR ensures that we don't return data in case the SDK is disabled.

Added more tests to ensure this is now properly covered, along with a test for behaviour with tracesSampleRate: 0.

@Lms24 Lms24 self-assigned this Sep 24, 2024
@Lms24 Lms24 requested review from a team, AbhiPrasad and s1gr1d and removed request for a team September 24, 2024 08:08
@Lms24 Lms24 changed the title fix(core): Don't emit trace data in getTraceData and getTraceMetaTags if SDK is disabled fix(core): Don't return trace data in getTraceData and getTraceMetaTags if SDK is disabled Sep 24, 2024
Copy link
Member

@s1gr1d s1gr1d left a comment

Choose a reason for hiding this comment

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

Nice, thanks for adding this 🙌

@Lms24 Lms24 force-pushed the lms/fix-core-getTraceData-sdk-disabled branch from f40a005 to 6453d88 Compare September 24, 2024 14:57
@Lms24 Lms24 force-pushed the lms/fix-core-getTraceData-sdk-disabled branch from b51915c to ca986f6 Compare September 26, 2024 14:31
@Lms24 Lms24 enabled auto-merge (squash) September 26, 2024 15:56
@Lms24 Lms24 merged commit 2f53df7 into develop Sep 26, 2024
132 checks passed
@Lms24 Lms24 deleted the lms/fix-core-getTraceData-sdk-disabled branch September 26, 2024 16:01
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.

3 participants