Skip to content

v0.10.0

Choose a tag to compare

@robert-northmind robert-northmind released this 09 Feb 13:08
· 71 commits to main since this release
cf50cc4

Faro Flutter SDK v0.10.0

✨ Added

  • Session sampling support: New sampling configuration option allows controlling what percentage of sessions send telemetry data. This enables cost management and traffic reduction for high-volume applications. (Resolves #89)

    • Use SamplingRate(0.5) for fixed 50% sampling
    • Use SamplingFunction((context) => ...) for dynamic sampling based on session context (user attributes, app environment, etc.)
    • If not provided, all sessions are sampled (100%)
    • Sampling decision is made once per session at initialization and applies to all telemetry types (events, logs, exceptions, measurements, traces)
    • Example: sampling: SamplingFunction((context) => context.meta.user?.attributes?['role'] == 'beta' ? 1.0 : 0.1)
    • Aligns with Faro Web SDK sampling behavior
  • ContextScope for span context lifetime control: New contextScope parameter on startSpan() controls how long a span remains active in zone context for auto-assignment. ContextScope.callback (default) deactivates the span when the callback completes, preventing timer/stream callbacks from inheriting it. ContextScope.zone keeps the span active for the entire zone lifetime, useful when you want timer callbacks to be children of the parent span. (Resolves #105)

  • Span.noParent sentinel: New Span.noParent static constant allows explicitly starting a span with no parent, ignoring the active span in zone context. Useful for timer callbacks or event-driven scenarios where you want to start a fresh, independent trace. (Resolves #105)

🔧 Fixed

  • SDK-internal span attributes now use typed values: HTTP span attributes (http.status_code, http.request_size, http.response_size) are now sent as integers instead of strings, enabling proper numeric queries in Tempo (e.g., status_code > 400).
  • Session attributes support typed values: sessionAttributes config now accepts Map<String, Object> allowing typed custom attributes. The device_is_physical attribute is now sent as a boolean instead of a string. (Resolves #133)

See CHANGELOG.md for complete details.


Full Changelog: v0.9.0...v0.10.0