Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: to remove telegram token from datadog rum #11072

Conversation

yaswanth-deriv
Copy link
Contributor

@yaswanth-deriv yaswanth-deriv commented Oct 31, 2023

Why?

In the screenshot below, you can observe that private data such as tokens and Telegram API tokens are being exposed in Datadog RUM (Real User Monitoring). Therefore, it's crucial for me, as a developer, to eliminate these sensitive details from the logs
datadog

Solution

I utilized the 'beforesend' method provided by Datadog, allowing us to manage each event before transmitting it to Datadog RUM. Within this function, I substituted the URLs with the necessary ones.

@boring-cyborg boring-cyborg bot added the Core label Oct 31, 2023
@vercel
Copy link

vercel bot commented Oct 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview Nov 7, 2023 7:07am

@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2023

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/binary-com/deriv-app/pull/11072](https://github.com/binary-com/deriv-app/pull/11072)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-yaswanth-deriv-yaswanth-cfds-1290-rem-f7829b.binary.sx?qa_server=red.derivws.com&app_id=31468
    - **Original**: https://deriv-app-git-fork-yaswanth-deriv-yaswanth-cfds-1290-rem-f7829b.binary.sx
- **App ID**: `31468`

@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2023

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 15
🟧 Accessibility 75
🟢 Best practices 92
🟧 SEO 85
🟧 PWA 80

Lighthouse ran with https://deriv-app-git-fork-yaswanth-deriv-yaswanth-cfds-1290-rem-f7829b.binary.sx/

@coveralls
Copy link

coveralls commented Nov 6, 2023

Coverage Status

coverage: 26.678% (-0.006%) from 26.684%
when pulling 4a28237 on yaswanth-deriv:yaswanth/CFDS-1290-remove_token_ids_from_datadog_rum
into 45ec33f on binary-com:master.

Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@deriv.com>
Copy link

sonarcloud bot commented Nov 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ali-hosseini-deriv
Copy link
Member

image I Tested used regex

Copy link
Contributor

github-actions bot commented Nov 7, 2023

🚀 Smoke test run (1) passed successfully!

@ali-hosseini-deriv ali-hosseini-deriv merged commit 8554a83 into deriv-com:master Nov 7, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants