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

Add support for react-native-web #276

Open
onlyanegg opened this issue Sep 16, 2022 · 8 comments
Open

Add support for react-native-web #276

onlyanegg opened this issue Sep 16, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@onlyanegg
Copy link

Is your feature request related to a problem? Please describe.
The react-native-web build does not work

Describe the solution you'd like
Support react-native-web

Describe alternatives you've considered
Currently I'm mocking DdSdk and other objects in the web build with a webpack alias. I could try writing code to make requests either with the browser SDK or an http client. But it think it would make more sense if it lived in here, even if it were basically a proxy to the browser SDK.

@onlyanegg onlyanegg added the enhancement New feature or request label Sep 16, 2022
@louiszawadzki
Copy link
Contributor

Hi @onlyanegg, thanks for reaching out on this topic!

It is in our backlog, but it isn't places on the roadmap yet.
In the meantime I would suggest that you try writing a proxy to the browser SDK for the web part.

@onlyanegg
Copy link
Author

Ok, thank you :)

@leggomuhgreggo
Copy link

leggomuhgreggo commented Oct 15, 2022

+1 on this

I've been using a custom cross-platform abstraction -- and I'm very glad to have the functionality I am able (thanks!) But I will say that it's been quite difficult at times, to keep things in aligned

After a couple bugs slipped in, I've started to ensure that any update includes an exhaustive accounting of configuration changes / types def updates to ensure consistency between the platforms.

Even if a fully fledged solution doesn't make it onto the roadmap this time around, it would be tremendously useful to start aligning the APIs.

API Mismatch Summary

Native- vs web-specific config

  • only relevant to particular platform <-- perfectly legit, but ideally distinct from possibly similar sounding options
    • eg nativeCrashReportEnabled
  • seemingly missing feature
    • eg version (recently added!)

Overlapping config

  • same key / same value <-- this is the dream 😄
  • different key / same value <-- requires some aliasing, but not too bad
    • eg service vs serviceName
  • same or slightly different key / slightly different value 🤕
    • eg firstPartyHosts vs allowedTracingOrigins or siteParameter vs site
  • different key / same value, BUT unclear if features actually overlap 🤔
    • eg trackErrors vs forwardErrorsToLogs

Misc Other Issues

  • Method mismatch - names but also sync vs async
  • Companion libraries eg @datadog/browser-logs @datadog/mobile-react-navigation
  • CI / SourceMap orchestration

@onlyanegg
Copy link
Author

Hey, @leggomuhgreggo! Would you be open to sharing your abstraction? That could be super useful for me (and maybe others?) at least as a reference.

@leggomuhgreggo
Copy link

@onlyanegg the abstraction is a library in a private monorepo, but I threw the raw code in a repo here.

@onlyanegg
Copy link
Author

Thanks, @leggomuhgreggo!

@leggomuhgreggo
Copy link

Updated the example x-platform RUM client repo

@onlyanegg
Copy link
Author

Hey, @louiszawadzki! I just wanted to bump this. I'm having to do a bit of a refactor to our implementation because of and Expo update. Has supporting web in this lib gained any traction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants