Code Monkey home page Code Monkey logo

Comments (10)

tshedor avatar tshedor commented on July 30, 2024

Hey @antonkad what platform are you using? Flutter Android, Flutter Web, Flutter iOS?

from datadog_flutter.

antonkad avatar antonkad commented on July 30, 2024

we are using Flutter Web, i've set the script in the index.html, as in the example. The Rum is working fine.

from datadog_flutter.

tshedor avatar tshedor commented on July 30, 2024

@antonkad could you please try this dev branch?

datadog_flutter:
  git:
    url: [email protected]/GetDutchie/datadog_flutter.git
    ref: support-extra-info-web

from datadog_flutter.

antonkad avatar antonkad commented on July 30, 2024

Hello,

We've tried this new branch, btw if someone else passes here, in the url it's a ":" not a "/" such has in here:

url: [email protected]:GetDutchie/datadog_flutter.git
So after trying this out, we are facing another kind of problem related to the plateform:

UnsupportedError (Unsupported operation: Platform._operatingSystem)

In fact, when putting a break point, we can see that it tries to see if the plateform is iOS:

static Future<void> setUserInfo({
    String? id,
    String? email,
    Map<String, dynamic>? extraInfo,
    String? name,
  }) async {
    return await channel.invokeMethod('setUserInfo', {
      'id': id,
      'email': email,
      'extraInfo': Platform.isIOS ? jsonEncode(extraInfo) : extraInfo,
      'name': name,
    });
  }

https://github.com/GetDutchie/datadog_flutter/blob/main/lib/datadog_flutter.dart#L55

So we can't go thurther because of this erreur.

Regards

from datadog_flutter.

tshedor avatar tshedor commented on July 30, 2024

@antonkad please try again by commenting and uncommenting in your pubspec (to refresh the SHA). I've pushed a fix for this to the branch, I think.

from datadog_flutter.

antonkad avatar antonkad commented on July 30, 2024

We tried out the new version, the bug disapeared, but we no longer have any informations releated to the user (no user name, no user id). Neither in the user details, neither in the json attributes.

Do you know if there's a way to check the data that is sent, through a debugger localy ?

from datadog_flutter.

tshedor avatar tshedor commented on July 30, 2024

@antonkad this is tricky because everything is magically hidden in a Dart-to-JS translation. I'm not 100 percent sure how this works, and my debugging has been extremely seat-of-my-pants. I've got another idea in 570c178 (same branch) that could be worth trying.

The issue I'm hitting here is the attribute keys are unknown. And they can be mixed with the "reserved" keys of email, id, name. So I can't declare a specific Dart class to handle this and instead have to leave the Dart-to-JS compilation more flexibility in converting the payload and forwarding that payload to the external setUser function.

from datadog_flutter.

tshedor avatar tshedor commented on July 30, 2024

So I guess, please comment out that datadog_flutter in your pubspec, save, and uncomment and make sure the SHA in your pubspec.lock reflects the new commit and give that another go please.

from datadog_flutter.

antonkad avatar antonkad commented on July 30, 2024

Hello,

It seems to be working on our side after testing, moreover the user informations, we are getting extrainfos displayed on datadog.

thanks a lot !

from datadog_flutter.

tshedor avatar tshedor commented on July 30, 2024

Great, glad to hear it

from datadog_flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.