---
title: "Discussion on \"Enabling Chrome Extension Logging with Datadog: A Journey of Trial and Error\" | Hashnode"
description: "Discussion on \"Enabling Chrome Extension Logging with Datadog: A Journey of Trial and Error\". A Deep Dive into Chrome Extensions and Datadog Integration: Challenges and Solutions"
url: "https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Enabling Chrome Extension Logging with Datadog: A Journey of Trial and Error](https://eng.grip.security/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error?utm_source=hashnode&utm_medium=feed)

A Deep Dive into Chrome Extensions and Datadog Integration: Challenges and Solutions

Jul 24, 2023 · 6 min read · eng.grip.security  
Read the article

-   [#chrome-extension](https://hashnode.com/tag/chrome-extension)
-   [#logging](https://hashnode.com/tag/logging)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#datadog](https://hashnode.com/tag/datadog)

## Written by

[Guy Goldenberg](https://hashnode.com/@gripguyg)

@gripguyg · Israel

  
[View profile](https://hashnode.com/@gripguyg)

Senior Software Engineer @ Grip Security

## Responses 4

Markdown supported · ⌘↵ to post

[Amit Beckenstein](https://hashnode.com/@amitbeck)

[Apr 14, 2025](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/67fcda58f03e5726b49007aa)

This doesn't seem to work anymore

[Buy Verified Paxful Account](https://hashnode.com/@seosmmbiz17)

[Jul 6, 2024](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/668914b6e24c895425a57469)

We offer 100% secure and fully verified personal and business Cash App accounts at the best prices.If you want a secure, stable, and fully verified personal and business Cash App account, you can place your order at seosmmbiz

[Juliana Cox](https://hashnode.com/@julianacox01)

[Jul 2, 2024](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/6683de9837a76003ef79b9a4)

In March 2024, I found myself facing a bad scenario that many in the cryptocurrency space dread – falling victim to a phishing scam and losing a substantial amount of Bitcoin, totaling around $300,000. It was a devastating blow, one that left me feeling helpless and betrayed by the very technology I had come to trust. However, amidst the despair, a glimmer of hope emerged in the form of Digital Hack Recovery. In the attack, I was determined to learn from my mistake and take proactive measures to prevent such incidents from happening again. I delved into the world of cryptocurrency security, absorbing every piece of information I could find to arm myself against future threats. It was during this research phase that I came across Digital Hack Recovery, a name that would soon become synonymous with salvation. What struck me initially about Digital Hack Recovery was their emphasis on education and awareness. They understood that ignorance was often the greatest vulnerability in the crypto space and sought to empower their clients with the knowledge to mitigate risks effectively. Their website was a treasure trove of resources, offering comprehensive guides on security best practices, common scams to watch out for, and steps to take in the event of a breach. It was evident that they were not just a recovery service but a beacon of guidance in a sea of uncertainty. Upon reaching out to Digital Hack Recovery, I was met with a level of expertise that immediately put me at ease. Unlike other recovery platforms I had encountered, they took the time to assess my case thoroughly before committing to any action. Their transparency was refreshing – they made it clear from the outset what the likelihood of success was and what steps would be involved in the recovery process. This level of honesty instilled confidence in their capabilities and gave me hope that all was not lost. Throughout the recovery journey, Digital Hack Recovery maintained clear and open communication, providing regular updates on their progress and patiently answering any questions or concerns I had along the way. Their dedication to customer satisfaction was evident in every interaction, and it was clear that they genuinely cared about restoring not just my funds but also my peace of mind. In the end, Digital Hack Recovery delivered on its promise, managing to recover approximately 80% of the funds I had lost to the scam. While the financial aspect was certainly significant, it was the sense of closure and justice that proved to be the most valuable takeaway. Thanks to their expertise and perseverance, I was able to reclaim a portion of what was rightfully mine and move forward with renewed confidence in the crypto landscape. I cannot recommend Digital Hack Recovery highly enough to anyone who finds themselves in a similar predicament. Their commitment to education, transparency, and customer satisfaction sets them apart as a beacon of hope in an otherwise tumultuous industry. While the scars of my ordeal may never fully heal, knowing that there are professionals like Digital Hack Recovery standing ready to assist brings a sense of comfort and reassurance that is truly priceless. Trusting them with my recovery was undoubtedly one of the best decisions I have ever made, and I am eternally grateful for their unwavering support. Their contact;

WhatsApp +19152151930

Email; digital hack recovery @ techie . com

[789](https://hashnode.com/@789clubgains)

[Apr 5, 2024](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/660f58c1f4259e592278d54d)

## Sicbo 789Club – Chơi là mê, đổi thưởng uy tín

## Chơi Sicbo tại 789Club - Một trải nghiệm đầy thú vị và kịch tính, với đảm bảo về tính minh bạch và sự đổi thưởng đáng tin cậy.

Chi Tiết: [chembargains.com/sicbo-789club](https://chembargains.com/sicbo-789club/)

[John Gordon](https://hashnode.com/@jack589)

[Feb 1, 2024](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/65bc09c0fba70baa45d0d678)

Just in case other people run into this:

I was getting 403's when I implemented the solution in this blog. It turns out that my company uses a different datadog enpoint than the default. So if you're using a different one, here's how to configure it:

```
const configuration = client.createConfiguration({
  authMethods: {
    apiKeyAuth: "pub...",
  },
});

configuration.setServerVariables({
  site: "us5.datadoghq.com"
});

const apiInstance = new v2.LogsApi(configuration);
```

[Aviv Elmakias](https://hashnode.com/@gripaviv)

[Mar 24, 2024](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/65bc09c0fba70baa45d0d678#reply-65ffee515c8272e3f605f291)

Hi John, I would appreciate if you can elaborate on how did you find you have a different endpoint from the default.

[Sergiy Voznyak](https://hashnode.com/@SergioV85)

[Nov 9, 2023](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/654d4ec5779490033fc411d2)

Hi Guy! Thank you very much for sharing your experience. Did you face a CORS error while sending logs to DD from the extension? I have a problem: all requests, either from `background` or `content` are rejected by Datadog with the error:

```
Access to fetch at 'http-intake.logs.datadoghq.eu/api/v2/logs' from origin 'chrome-extension://*********' has been blocked by CORS policy: Request header field dd-api-key is not allowed by Access-Control-Allow-Headers in preflight response.
```

Postman's exact (absolutely the same) request passed successfully (code 202 and entry in Datadog).

[Guy Goldenberg](https://hashnode.com/@gripguyg)

[Nov 28, 2023](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/654d4ec5779490033fc411d2#reply-6565e0843f1e344797233d45)

Interesting! Generally, since the API should be accessible and must receive this header, I suspect this might be related to the endpoint you are trying to send the logs to.

I see that you are using `http-intake.logs.datadoghq.eu/api/v2/logs`

It's worth trying to send the requests to `[http-intake.logs.datadoghq.com/api/v2/logs](https://http-intake.logs.datadoghq.com/api/v2/logs)` (`.com` instead of `.eu`)

Let me know if it works :)

[Yuki Oshima](https://hashnode.com/@maco)

[Mar 21, 2024](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/654d4ec5779490033fc411d2#reply-65fbceeeea7df4785ec5ffb2)

Hi. I'm facing a similar error as well. I think this behavior might be because the API is not designed to be called from a browser. I would be grateful if you could let me know if you find any workarounds.

[Sargis](https://hashnode.com/@Sarkis)

[Jun 26, 2024](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/654d4ec5779490033fc411d2#reply-667c5cce745ad85767532098)

[Guy Goldenberg](https://hashnode.com/@gripguyg)

Unfortunately, I am also facing same issue. Works in postman, getting CORs issue from background script:

```
Access to fetch at 'http-intake.logs.us5.datadoghq.com/api/v2/logs' from origin 'chrome-extension://obdlkagmmgblbmgmflmkeopiennejpph' has been blocked by CORS policy: Request header field dd-api-key is not allowed by Access-Control-Allow-Headers in preflight response.
```

[Yonatan Eilat](https://hashnode.com/@iYonatan)

[Jul 25, 2023](https://hashnode.com/posts/enabling-chrome-extension-logging-with-datadog-a-journey-of-trial-and-error/64be67cbdff7801f7f82e1ae/comment/64c03127dfa67f260ae446c4)

This blog just saved me. I had the document is not defied error for so long. Great blog, I’m sure it’s going to serve me in the future and a lot of other developers.
