Replace Gitlab::Json.parse -> Gitlab::Json.safe_parse
What does this MR do and why?
Replaces Gitlab::Json.parse with Gitlab::Json.safe_parse in lib/observability/o11y_token.rb.
Gitlab::Json.parse raises an exception on invalid JSON, while Gitlab::Json.safe_parse returns nil instead. Since both call sites already handle the failure case gracefully (via dig returning nil and a rescue JSON::ParserError block), using safe_parse is the safer and more consistent approach, aligning with the codebase convention of preferring safe_parse for external response parsing.
References
How to set up and validate locally
- No functional change expected, existing tests should continue to pass.