Giter Club home page Giter Club logo

Comments (6)

ncreated avatar ncreated commented on May 20, 2024 2

Hey @lmramirez 👋. We decided to implement a different write / upload performance preset for SDK running in app extension. Hope this will address your problem and result with significantly more logs delivered. It was just merged - please stay tuned for the next release and let us know this helps.

from dd-sdk-ios.

lmramirez avatar lmramirez commented on May 20, 2024 1

@ncreated thank you so much!! Will give that a try

from dd-sdk-ios.

ncreated avatar ncreated commented on May 20, 2024

Hello @lmramirez 👋 thanks for trying out the SDK 🙂. As for now, there's no public API to configure the data upload frequency. We rather avoid exposing it so that users do not end up with a configuration that is ineffective or kills the app performance. Instead, with "immediate write" and "deferred upload" strategy implemented by the SDK, apps should not care about enforcing immediate uploads. We do our best to make sure the logs are delivered in a performant way.

The upload frequency is dynamic - it might vary from 1s to 20s depending on the logging pressure. Logs are written to the file system and they should be uploaded in the next session if app was terminated or suspended.

I think that your use case of short-lived app extension falls somehow beyond our upload heuristic. Could you give us more insight into this extension lifecycle?

  • How long does it run in average?
  • How often do your users come back to the extension?

We are going investigate the use case of app extensions for the SDK, so I put the enhancement label on this issue. Stay tuned we'll try to address it.

from dd-sdk-ios.

lmramirez avatar lmramirez commented on May 20, 2024

@ncreated thank you for the detailed response.

The app allows users to make screen recordings of their iOS devices, so the time the extension runs ranges from about 15 seconds to maybe an hour in some cases.
Some users come back frequently and make daily recordings and others do not return to the extension for weeks. Users come back to our host application more often than they come back to our extension, since the host application providers other functionality as well.

I haven't dug too deep into the datadog implementation, but is there a way to configure the location logs are written to on disk? It would be nice to have the option to configure this to point at a location in our App Group directory, so that it could be read and uploaded by the host application maybe?

Again, thanks to you and the datadog team for working on this! We have some hard to debug issues in our app extension and this sdk is already helping us a lot in testing.

from dd-sdk-ios.

ncreated avatar ncreated commented on May 20, 2024

Thanks for details 👌. So as I understand you manage to upload some logs from the extension, but some number of short & unfrequent sessions is lost. One thing to comment here is that some percent of logs will be lost even when we apply the fix - due to our internal constraints we don't process logs that are significantly old. But even with this, the enhancement should give you a viable benefit.

I haven't dug too deep into the datadog implementation, but is there a way to configure the location logs are written to on disk?

We store data in Library/Caches subdirectory, but this is internal thing to the SDK. Currently we don't think about making this configurable for the same reasons I explained above (this will introduce many edge cases and put huge load on the maintenance).

It would be nice to have the option to configure this to point at a location in our App Group directory, so that it could be read and uploaded by the host application maybe?

Indeed, that might be one idea for the enhancement. However, AFAIK App Group configuration does not come out-of-the-box and must be opted-in, so may not cover other app extension use cases. We have some other ideas in mind and soon will give them a shot 🙂.

Again, thanks to you and the datadog team for working on this! We have some hard to debug issues in our app extension and this sdk is already helping us a lot in testing.

Ah, thank you 🤗, I'm gonna share it with the team.

from dd-sdk-ios.

lmramirez avatar lmramirez commented on May 20, 2024

Thanks for details 👌. So as I understand you manage to upload some logs from the extension, but some number of short & unfrequent sessions is lost

Yep, this is correct.

And totally understand about configurability. App group is opt-in, so devs would need to provide their app group identifier as part of setup if that was an option.

Thanks for your help!

from dd-sdk-ios.

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.