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

Support for custom trace #495

Open
fahmisdk6 opened this issue Oct 18, 2023 · 4 comments
Open

Support for custom trace #495

fahmisdk6 opened this issue Oct 18, 2023 · 4 comments
Labels
enhancement New feature or request gauging-interest We are determining how much interest there is in this feature

Comments

@fahmisdk6
Copy link

fahmisdk6 commented Oct 18, 2023

We want to implement tracing where we have full control to start and stop the tracing. For example we want to track the time needed from user tap Submit button in screen A until screen B fully loaded. We currently use
https://firebase.google.com/docs/perf-mon/custom-code-traces?platform=flutter#add-custom-code-traces but want to implement it in datadog.

We have tried current solutions from dd-sdk-flutter but found some restrictions:

  1. addTiming seems to only suitable to track screen opened -> something loaded
  2. track-user-action has restriction of 10s and will automatically stopped when user move to another screen
  3. track-custom-resource need to be treated as http request, need url, method etc.

We also noticed that datadog android has capability of tracing, is it equivalent to firebase perf custom trace and can we implement it in flutter?
https://docs.datadoghq.com/tracing/trace_collection/dd_libraries/android/?tab=kotlin

Thanks

@fahmisdk6 fahmisdk6 added the enhancement New feature or request label Oct 18, 2023
@fuzzybinary fuzzybinary added the gauging-interest We are determining how much interest there is in this feature label Oct 18, 2023
@fuzzybinary
Copy link
Collaborator

Hi @fahmisdk6, thanks for filing an issue.

We currently looking into ways to support this exact use case across all of the mobile SDKs, as well as eventual support for custom tracing in the Flutter SDK, but we're still working out the specifics.

For better tracking, please also make sure you reach out to your CSM and have them file a feature request. This helps us gauge interest and prioritize appropriately.

As a workaround, Note that some folks have used start / stop resource for this. While it does require a url / http request method, you can just supply constant fake values for them. Datadog should accept the resource anyway.

However, for your use case, it sounds like you want the resource to span between two views. Is that accurate?

@fahmisdk6
Copy link
Author

Thank for your response, so I can conclude that the implementation is still in "gauging-interest" phase, right?

However, for your use case, it sounds like you want the resource to span between two views. Is that accurate?

Yes, the trace should be view agnostic as we only need to measure the duration between event A to event B.

@fahmisdk6
Copy link
Author

fahmisdk6 commented Oct 19, 2023

Hi again @fuzzybinary, can you confirm if our use case can be catered by these two native implementations?
https://docs.datadoghq.com/tracing/trace_collection/dd_libraries/android/?tab=kotlin
https://docs.datadoghq.com/tracing/trace_collection/dd_libraries/ios/?tab=cocoapods

If yes, then my company consider to create unofficial plugin to implement these in flutter.

@fuzzybinary
Copy link
Collaborator

Hi @fahmisdk6,

We're a bit farther from gauging interest but since we are also still working out some particulars around implementation I've decided to use that tag for now (and also I want to make sure anyone who needs similar functionality reaches out to their CSM so we can get a clear picture of whether we're hitting everyone's needs).

Native tracing might work for your use case, yes. However, we actually stopped using native tracing in the Flutter SDK because of this bug which completely broke iOS tracing. It's possible this has been fixed on the Apple side, but I'm not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gauging-interest We are determining how much interest there is in this feature
Projects
None yet
Development

No branches or pull requests

2 participants