Package com.inmobi.sdk

## Object InitTelemetryHelper

- All Implemented Interfaces:

      public class InitTelemetryHelper

  Lightweight telemetry path for SDK startup events that can happen before the normal telemetry runtime is available.

  `TelemetryComponent` is intentionally not used here. Starting or querying the normal telemetry stack can pull in config/component work before SDK init has completed, and buffering these events until `TelemetryComponent` starts would make pre-init and init-failure reporting dependent on a successful publisher init. That is exactly the gap this helper covers: it can report pre-init completion, SDK init started, and SDK init failures from the beginning of the flow using only the cached pre-init KV snapshot and a no-interceptor network client.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `public final static InitTelemetryHelper` | `INSTANCE` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `final static Unit` | `submitPreInitCompleted(Context context, Long latency, Short errorCode)` | Reports the provider pre-init terminal state through the lightweight init telemetry path.
    `final static Unit` | `submitSdkInitStarted(Context context, Long preInitToInitGap)` | Reports that publisher SDK init was invoked, including pre-init to init latency when known.
    `final static Unit` | `submitSdkInitFailed(Context context, Long latency, Short errorCode)` | Reports SDK init failure before the normal telemetry pipeline is guaranteed to be available.
    `final static Unit` | `submitSdkContextChanged(Context context)` | Reports that the SDK application context was replaced after one was already available.
    `final Unit` | `submitInitCompletedTelemetry(InitRequest initRequest, Long elapsed, String message)` |
    `final Map<String, Object>` | `buildSdkInitializedPayload(Long startTime, Short sdkInitializedTrigger)` |
    `final Short` | `mapInitFailureErrorCode(String message)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

  - ### Method Detail

    - #### submitPreInitCompleted

           final static Unit submitPreInitCompleted(Context context, Long latency, Short errorCode)

      Reports the provider pre-init terminal state through the lightweight init telemetry path.

    - #### submitSdkInitStarted

           final static Unit submitSdkInitStarted(Context context, Long preInitToInitGap)

      Reports that publisher SDK init was invoked, including pre-init to init latency when known.

    - #### submitSdkInitFailed

           final static Unit submitSdkInitFailed(Context context, Long latency, Short errorCode)

      Reports SDK init failure before the normal telemetry pipeline is guaranteed to be available. Future release task: after verifying this path's prod health metrics, combine this event into SdkInitialized and use errorCode presence to denote failure.

    - #### submitSdkContextChanged

           final static Unit submitSdkContextChanged(Context context)

      Reports that the SDK application context was replaced after one was already available.

    - #### submitInitCompletedTelemetry

           final Unit submitInitCompletedTelemetry(InitRequest initRequest, Long elapsed, String message)

    - #### buildSdkInitializedPayload

           final Map<String, Object> buildSdkInitializedPayload(Long startTime, Short sdkInitializedTrigger)

    - #### mapInitFailureErrorCode

           final Short mapInitFailureErrorCode(String message)