[DO NOT MERGE] Implement custom exceptions raised from profiler code #4990
+88
−89
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
THIS IS FROM CLAUDE CODE - USE AS AN EXAMPLE ONLY - HASN'T BEEN REVIEWED - DO NOT MERGE
In #4985 we removed
pii_safe
to get error logs back into compliance that the messages that we send to intake are a set of known strings.In this PR we implement a suggestion of changing known errors that we raise in the native(?) bits of Ruby to use a custom exception type. We will then take this exception type and we will log these errors to intake (we'd avoid sending any potentially unknown exceptions this way).
Motivation:
#4985 (comment)
This was the initial recommendation/suggestion that spawned this
pii_safe
option. Only invoke telemetry methods with PII safe arguments.rb_raise(rb_eRuntimeError, ...
torb_raise(rb_eDatadogProfilingError, ...
Change log entry
None.
Additional Notes:
How to test the change?
I don't know, I'd need help here