語言

SearchSpec.SearchSourceLogTag 屬性

定義

會獲得一個標籤來標示此搜尋的來源,或 null 是否 Builder#setSearchSourceLogTag(String) 未被呼叫。

public string? SearchSourceLogTag { [Android.Runtime.Register("getSearchSourceLogTag", "()Ljava/lang/String;", "", ApiSince=35)] get; }
[<get: Android.Runtime.Register("getSearchSourceLogTag", "()Ljava/lang/String;", "", ApiSince=35)>]
member this.SearchSourceLogTag : string

屬性值

屬性

備註

會獲得一個標籤來標示此搜尋的來源,或 null 是否 Builder#setSearchSourceLogTag(String) 未被呼叫。

部分 AppSearch 實作可能會使用 statsd 記錄此標籤的雜湊值。 此標籤可用於追蹤應用程式元件的效能問題與崩潰情況。

若想在效能分析中區分此搜尋情境與其他搜尋情境,請呼叫 Builder#setSearchSourceLogTag 並給予唯一值。

AppSearch 絕不會使用 statsd 記錄原始字串值,但會 as-is 你在應用程式中註冊的自訂 AppSearchLogger 實作提供該值。

Java 文件 android.app.appsearch.SearchSpec.getSearchSourceLogTag()。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於