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

Sending Logs to Backend Before Forwarding to Datadog (Without Exposing clientToken) #3104

Open
maoryadin opened this issue Oct 31, 2024 · 3 comments

Comments

@maoryadin
Copy link

I would like to implement a method to send logs to my backend first, rather than directly to Datadog.

This would allow my backend to perform checks or transformations on the payload before forwarding it to Datadog. Additionally, this setup would prevent the need to expose the clientToken on the frontend, which is essential for maintaining security.

Is this approach supported by Datadog, or are there any recommended best practices for achieving this?

Thank you!

@amortemousque
Copy link
Contributor

Hello @maoryadin,
You can configure a proxy URL to send the Logs / RUM events to you backend. Here is the guide. This guide focuses on the RUM SDK but the same capability exists for the Logs SDK.

@rodgarcialima
Copy link

@maoryadin @amortemousque This is exactly what I was trying to achieve, and the proxy works fine, but my "proxy" backend requires authentication (Bearer Token), and this is not possible with the current proxy implementation. I'd love to see a way of injecting headers before the proxy call.

@amortemousque
Copy link
Contributor

Hello @rodgarcialima,
Thanks for the feedback!
Currently the proxy does not support passing headers but it seems a legitimate use case. I'll bring it to the team and let you know.

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

No branches or pull requests

3 participants