Giter Club home page Giter Club logo

Comments (5)

ncreated avatar ncreated commented on June 2, 2024

Hey @jrmybrault 👋. In order to see SDK logs, please make sure you set the right verbosity:

Datadog.verbosityLevel = .debug

It is hard to explain nil in availableCrashReport.context without understanding the setup of your SDK. The context gets injected through this flow and it happens upon receiving several signals from different parts of the SDK.

In order to understand what's happening, we must know your SDK configuration. Which modules from our SDK you use and how they are configured?

from dd-sdk-ios.

jrmybrault avatar jrmybrault commented on June 2, 2024

Hello @ncreated 👋

What I can tell is that we are currently using both logs & RUM. In terms of configuration, I don't think we do anything fancy. Should we look for something in particular ?
I can give you some pieces of the setup, although not everything happens at the same place so here I'm grouping things for clarity.

       let configuration = Datadog.Configuration(
            clientToken: Constant.clientToken,
            env: Environment.prod.rawValue,
            site: .eu1,
            service: Constant.service
        )

        Datadog.initialize(
            with: configuration,
            trackingConsent: .granted,
            instanceName: Constant.instanceName
        )

        let core: DatadogCoreProtocol = Datadog.sdkInstance(named: configuration.instanceName)

        let logsConfiguration = DatadogLogs.Logger.Configuration(
            service: configuration.service,
            name: String(describing: self),
            networkInfoEnabled: true,
            consoleLogFormat: .shortWith(prefix: "[DatadogLogger]")
        )

        Logs.enable(in: core)

        let rumConfiguration = RUM.Configuration(
            applicationID: configuration.rumApplicationID,
            sessionSampleRate: configuration.rumSessionsSamplingRate,
            uiKitViewsPredicate: DefaultUIKitRUMViewsPredicate(),
            uiKitActionsPredicate: DefaultUIKitRUMActionsPredicate(),
            urlSessionTracking: .init(
                firstPartyHostsTracing: .trace(hosts: configuration.firstPartyHosts),
                resourceAttributesProvider: { request, response, _, _ in
                    return [
                        Constant.attributeRequestHeadersKey: request.allHTTPHeaderFields?.map { "\($0.0): \($0.1)" },
                        Constant.attributeResponseHeadersKey: (response as? HTTPURLResponse)?.allHeaderFields.map { "\($0.0): \($0.1)" }
                    ]
                }
            )
        )

        RUM.enable(with: rumConfiguration, in: core)

from dd-sdk-ios.

ncreated avatar ncreated commented on June 2, 2024

@jrmybrault We don't see any code that enables DatadogCrashReporting. From what I see, you're using named SDK instance, so make sure CrashReporting.enable(in:) is called with the core reference (like you do for RUM and Logs).

Except missing DatadogCrashReporting bits, the snippet you provided looks fine. To move forward we must see a minimal setup where we can reproduce the problem, otherwise we're looking for a needle 🪡 in a haystack.

from dd-sdk-ios.

jrmybrault avatar jrmybrault commented on June 2, 2024

@ncreated
Ah yes sorry, I thought it would be obvious but we also do call CrashReporting.enable().

But indeed we probably don't call it with the right instance, I'll try that and let you know !

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.