Skip to content

Conversation

mario-launchdarkly
Copy link
Contributor

@mario-launchdarkly mario-launchdarkly commented Oct 3, 2025

Note

Rearchitects the SDK into modular services (logs/traces/metrics/session/crash) using OpenTelemetry exporters and new domain models, adds sampling and URLSession instrumentation, and replaces legacy modules and wiring.

  • Architecture:
    • Split into DomainModels, ApplicationServices, OTelInstrumentation, ObservabilityServiceLive, iOSSessionService, and KSCrashReportService targets; remove legacy Observability, Instrumentation, and API/Observe layers.
    • Reorganize Package.swift to reflect new modules and tests.
  • Core APIs:
    • Introduce domain types: AttributeValue, Severity, Span, Metric, and updated SemanticConvention.
    • Add service facades: ObservabilityService (aggregates MetricsService, TracesService, LogsService), SessionService, UserInteractionService, CrashReportService with async flush.
    • Redesign Options (feature flags for logs/traces/metrics, tracingOrigins, urlBlocklist, customHeaders as dict, OSLog).
    • Update LDObserve to use ObservabilityService with concurrent access and async flush.
  • OTEL Instrumentation:
    • Implement HTTP exporters for logs/metrics/traces, sampling decorators, and resource propagation; add URLSession instrumentation and span customization.
    • Add user interaction spans (user.tap, user.swipe).
  • Crash Reporting:
    • Replace old crash reporter with KSCrashReportService and LDCrashFilter that emits fatal logs via LogsService and awaits async flush.
  • Sampling:
    • Refactor sampler into SamplingLive (ExportSampler.build/customSampler), add helpers to sample logs/spans and propagate launchdarkly.sampling.ratio attribute.
  • LaunchDarkly integration:
    • Observability plugin builds ObservabilityService, enriches resource and headers with launchdarkly.sdk.version and highlight.project_id.
    • EvalTracingHook now starts/ends spans via LDObserve.
  • Example App/Views:
    • Adjust imports; TraceView ends span and triggers LDObserve.shared.flush(); config uses new Options flags.

Written by Cursor Bugbot for commit d11f1b9. This will update automatically on new commits. Configure here.

@mario-launchdarkly mario-launchdarkly requested a review from a team as a code owner October 3, 2025 21:14
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@abelonogov-ld abelonogov-ld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are small comments but they could be fixed later

@mario-launchdarkly mario-launchdarkly merged commit b792a5c into main Oct 7, 2025
2 checks passed
@mario-launchdarkly mario-launchdarkly deleted the feature/soc branch October 7, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants