Code Monkey home page Code Monkey logo

Comments (6)

tshedor avatar tshedor commented on July 30, 2024 3

@siavash-mohseni @xacaciax Please update to 1.5.2

from datadog_flutter.

tshedor avatar tshedor commented on July 30, 2024

Hey @siavash-mohseni thanks for using this package.

That's an interesting bug. So, ideally, nested dictionaries are handled with this recursive function. Are you passing in null values by any chance? Can you provide an example of an attribute payload that fails?

And I'd love the help if you wanted to work around that statement. My other thought is that your nested attributes don't have String keys and thus there is no recursion.

from datadog_flutter.

siavash-mohseni avatar siavash-mohseni commented on July 30, 2024

Hi @tshedor,
Thanks for your answer.

I think my attributes are fairly simple. Something like this:

{ "exception": "exception message", "stackTrace": "stack trace string", "context": { "key1": "value1", "key2": "value2" } }

None of the values are null and all the keys are Strings.

I debugged the code and first time in recursive function it is coverting the context successfully to [AttributeKey : AttributeValue] but when it tries to convert the whole attributes and exit the function it return null.

It seems that the conversion is not successful when you have a nested dictionary in attributes here:

return unencodedAttributes as? [AttributeKey : AttributeValue]](

return unencodedAttributes as? [AttributeKey : AttributeValue]
)

If I remove the context node, or replace its value with a String it will work successfully.

I'm not a Swift expert, but it seems to me that the nested dictionary is not being considered a Codable type and Swift is not able to convert it accordingly.

Thanks a lot 👍

from datadog_flutter.

xacaciax avatar xacaciax commented on July 30, 2024

I am having a similar issue with List<String> custom attributes not propagating to datadog for iOS devices when added to the user with the extraInfo parameter.

When I add attributes to the user like:

    await DatadogFlutter.setUserInfo(id: user.id, extraInfo: {
      'organizations': ['demo', 'demo_probation'],
    });

the attributes show up as Custom Attributes for Android devices but not for iOS.

from datadog_flutter.

xacaciax avatar xacaciax commented on July 30, 2024

Hi @tshedor, we are eagerly watching this issue. I checked with the engineers on my team to see if we could submit a fix for this but unfortunately we won't be able 😞 I wanted to ask here if you plan to fix this and if so, do you know when? Thank you! 🙏🏼

from datadog_flutter.

tshedor avatar tshedor commented on July 30, 2024

image

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.