• Parameters

    Returns {
        initialize(applicationId, uploadEnabled, config?): void;
        setDebugViewTag(value): void;
        setLogPings(flag): void;
        setSourceTags(value): void;
        setUploadEnabled(flag): void;
    }

    • initialize:function
      • Initialize Glean. This method should only be called once, subsequent calls will be no-op.

        Parameters

        • applicationId: string

          The application ID (will be sanitized, if necessary).

        • uploadEnabled: boolean

          Determines whether telemetry is enabled. If disabled, all persisted metrics, events and queued pings (except first_run_date) are cleared.

        • Optional config: ConfigurationInterface

          Glean configuration options.

        Returns void

    • setDebugViewTag:function
      • Sets the debugViewTag debug option.

        When this property is set, all subsequent outgoing pings will include the X-Debug-ID header which will redirect them to the "Ping Debug Viewer".

        Parameters

        • value: string

          The value of the header. This value must satisfy the regex ^[a-zA-Z0-9-]{1,20}$ otherwise it will be ignored.

        Returns void

    • setLogPings:function
      • Sets the logPings debug option.

        When this flag is true pings will be logged to the console right before they are collected.

        Parameters

        • flag: boolean

          Whether or not to log pings.

        Returns void

    • setSourceTags:function
      • Sets the sourceTags debug option.

        Ping tags will show in the destination datasets, after ingestion.

        Note: Setting sourceTags will override all previously set tags.

        Parameters

        • value: string[]

          A vector of at most 5 valid HTTP header values. Individual tags must match the regex: "[a-zA-Z0-9-]{1,20}".

        Returns void

    • setUploadEnabled:function
      • Sets whether upload is enabled or not.

        When uploading is disabled, metrics aren't recorded at all and no data is uploaded.

        When disabling, all pending metrics, events and queued pings are cleared.

        When enabling, the core Glean metrics are recreated.

        If the value of this flag is not actually changed, this is a no-op.

        If Glean has not been initialized yet, this is also a no-op.

        Parameters

        • flag: boolean

          When true, enable metric collection.

        Returns void

Generated using TypeDoc