DataDog / dd-sdk-flutter

Flutter bindings and tools for utilizing Datadog Mobile SDKs
Apache License 2.0
45 stars 42 forks source link

Desktop support #304

Open bobmoff opened 1 year ago

bobmoff commented 1 year ago

I think you know what I mean. 😎

The great thing about Flutter is that it's multiplatform.

fuzzybinary commented 1 year ago

Hi @bobmoff,

I know exactly what you mean 😄.

Right now, we're investigating this and gauging interest. If you can, please reach out to your CSM and raise a feature request. This will help us put it in proper place with our other priorities.

ralphleon commented 1 year ago

Hi Folks, we're also very interested in getting this working. We will have to pick a different vendor that supports desktop, which would be sad.

We will reach out to our CSM, but we figured commenting on this issue could be helpful as well. Any chance we could learn why this isn't supported by default? Seems straightforward for MacOS at least considering you support iOS already.

fuzzybinary commented 1 year ago

@ralphleon Thanks for commenting.

The Flutter SDK leverages work already done in the iOS and Android SDKs for some of the business rules around things like when to send data, how to format the data, required headers, logic for RUM, and querying for system vitals. That logic has to be brought in somehow for the desktop platforms, some of which are easier to port to than others.

We do think macOS is the lowest lift, we just haven't tested as other things have taken priority, and the other desktop platforms have much higher barriers to overcome.

Out of curiosity, would you be fine with just macOS support added, or do you need the other desktop platforms as well?

ralphleon commented 1 year ago

@fuzzybinary thank you for the thoughtful response. We did some investigation and saw that the platform dependent libraries were being imported in cocopods -- so this makes sense. We would be unblocked if MacOS was added. Windows would be a lovely bonus in the future as our app TigerEye targets both platforms.

We've implemented Firebase analytics in the meantime, which is the only product that seems to support flutter desktop. Not RUM, but gives us some telemetry. If there was some chance we could support the coding effort with our team at TigerEye we would be happy to help!

fuzzybinary commented 1 year ago

@ralphleon we have some changes coming into the native Datadog libraries "soon" that may make some of this easier.

The main issue right now with some of the RUM portions is that they rely on UIKit, and those will need to have conditional compilation added to remove them for macOS, as well as unit and integration tests modified to match.

If you or your team are so inclined, you can look at the datadog-sdk-ios repo to see if you can contribute those portions. The nice thing there is that it helps the iOS team support Catalyst, something that is also on our radar, but lower in priority.

ralphleon commented 1 year ago

@fuzzybinary we looked into it, but too much heavy lifting in your "core" libraries -vs- this thinly wrapped flutter library. We ended up re-implementing analytics and crash reporting using the DD API directly. A real waste of time, but given the lack of platform support in this library we couldn't find a better solution.

fuzzybinary commented 1 year ago

Sorry you had to do that 😞. I'll say we are still looking at ways to support this better long term (both for Flutter and other platforms as well) but it just hasn't hit the top or our priorities yet.

Please keep me and your CSM posted about how using the DD API works out for you. I'm still happy to lend my support where I can until we have a better official solution.

dgarrett-extron commented 8 months ago

What is the current status of windows desktop support?

fuzzybinary commented 8 months ago

Hi @dgarrett-extron,

Desktop is not currently supported. If this is something you need, please raise a feature request with your CSM. That will help us prioritize it properly.

dgarrett-extron commented 8 months ago

Will do, thanks

dgarrett-extron commented 6 months ago

Hi @fuzzybinary any update on the priority of Windows and MacOS desktop support? If it is still a low priority, are there any repos the engineering team has been working on that they could expose so that my company could attempt to add the missing functionality? Our company is using DD for other projects and the lack of Windows and MacOS support for desktop is really hampering our progress and decisions.

ralphleon commented 6 months ago

@dgarrett-extron the missing gaps are really low level, all at the framework level. They tightly coupled the DD api and a bunch of iOS only APIs (in obj-c!). We evaluated the effort, and it seems something @fuzzybinary and the rest of the DD team would be best at addressing. We told our CSM but they just gave us "thanks for the feedback" 🤷.

dgarrett-extron commented 6 months ago

@ralphleon That is unfortunate. So it looks like they will probably never take the time to look at it and fix it. I see you and your team went another direction and re-implemented analytics and crash reporting using the DD API directly. Sounds like that was a lot of work.

ralphleon commented 6 months ago

@dgarrett-extron it wasn't too bad to use their well documented REST API. Just a bit of a waste of time and still no RUM features. I think a proper implementation would require it to be done at the flutter level rather than being a wrapper on the legacy mobile APIs.

dgarrett-extron commented 6 months ago

Thanks @ralphleon , It is the RUM features we really need. I wonder why desktop is taking such a back seat.

fuzzybinary commented 6 months ago

Hey folks,

I get how frustrating it is that we don’t support Desktop at the moment and I wish I could tell you it’s high on our list, but unfortunately we haven’t seen a high enough demand for it just yet.

Whenever we add support for a new framework, OS, platform, etc, we want to be able to maintain this support over time, and make sure we have a feature rich offering in that one platform before moving on.

The downside of this strategy is that expanding to new platforms requires more effort, and unless we can make the business case for it / see high demand, it might not happen.

So being vocal here really helps to make the case for it, but raising feature requests through your CSM is even more efficient as it helps us link demand with revenue data, and make the case much more compelling for us to justify prioritization.

ralphleon commented 6 months ago

@fuzzybinary no worries, we get it. I think that thing that burns most is that the library isn't really "flutter". It's a thin wrapper on iOS / Android libs with very little dart code. Every two weeks an engineer asks "why aren't we using RUM with DataDog, as it supports RUM and Flutter" and in response I send them this github thread.

dgarrett-extron commented 6 months ago

@fuzzybinary & @ralphleon , thanks guys. At least I know that RUM will not be added any time soon. That at least helps us make the decision on which remote service to use.

fuzzybinary commented 6 months ago

@ralphleon To be honest, partially the answer is partially a level of effort on maintenance, and partially about being able to leverage certain features of the native SDKs that would require a lot of extra effort or additional dependencies on our side to support through Dart / Flutter directly (cpu load, average fps, battery state, network state are a few).

When we look to support desktop in Flutter, it is likely going to a similar situation where we look to support it somewhat natively, and have Flutter / React Native bind to the native support.

ralphleon commented 5 months ago

@fuzzybinary that makes sense, whatever helps y'all deliver the functionality as soon as possible. Is there any shared code between the different platform SDKs? I glanced at the repositories for https://github.com/DataDog/dd-sdk-ios and https://github.com/DataDog/dd-sdk-android and it was not apparent.

fuzzybinary commented 5 months ago

@ralphleon No there isn't at the moment. It's all the same team, and so we coordinate features and implementation approaches, but there's no shared code between the two.

ralphleon commented 5 months ago

@fuzzybinary Highly recommend. Great experience with cross platform core libraries, your iOS codebase is already structured that way. Would help greatly with development and maintenance. Dart has worked great for us at TigerEye!

NashIlli commented 4 months ago

+1 windows