Package io.sentry
Class Breadcrumb
- java.lang.Object
-
- io.sentry.Breadcrumb
-
- All Implemented Interfaces:
IUnknownPropertiesConsumer
public final class Breadcrumb extends java.lang.Object implements IUnknownPropertiesConsumer
Series of application events
-
-
Constructor Summary
Constructors Constructor Description Breadcrumb()Breadcrumb ctorBreadcrumb(@NotNull java.util.Date timestamp)Breadcrumb ctorBreadcrumb(@Nullable java.lang.String message)Breadcrumb ctor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptUnknownProperties(@NotNull java.util.Map<java.lang.String,java.lang.Object> unknown)Sets the unknown fields, internal usage onlystatic @NotNull Breadcrumbdebug(@NotNull java.lang.String message)Creates debug breadcrumb - typically a log message.static @NotNull Breadcrumberror(@NotNull java.lang.String message)Creates error breadcrumb.@Nullable java.lang.StringgetCategory()Returns the category@NotNull java.util.Map<java.lang.String,java.lang.Object>getData()Returns the data map@Nullable java.lang.ObjectgetData(@NotNull java.lang.String key)Returns the value of data[key] or null@Nullable SentryLevelgetLevel()Returns the SentryLevel@Nullable java.lang.StringgetMessage()Returns the message@NotNull java.util.DategetTimestamp()Returns the Breadcrumb's timestamp@Nullable java.lang.StringgetType()Returns the typestatic @NotNull Breadcrumbhttp(@NotNull java.lang.String url, @NotNull java.lang.String method)Creates HTTP breadcrumb.static @NotNull Breadcrumbhttp(@NotNull java.lang.String url, @NotNull java.lang.String method, @Nullable java.lang.Integer code)Creates HTTP breadcrumb.static @NotNull Breadcrumbinfo(@NotNull java.lang.String message)Creates info breadcrumb - information that helps identify the root cause of the issue or for whom the error occurred.static @NotNull Breadcrumbnavigation(@NotNull java.lang.String from, @NotNull java.lang.String to)Creates navigation breadcrumb - a navigation event can be a URL change in a web application, or a UI transition in a mobile or desktop application, etc.static @NotNull Breadcrumbquery(@NotNull java.lang.String message)Creates query breadcrumb - representing a query that was made in your application.voidremoveData(@NotNull java.lang.String key)Removes an entry from the data's mapvoidsetCategory(@Nullable java.lang.String category)Sets the categoryvoidsetData(@NotNull java.lang.String key, @NotNull java.lang.Object value)Sets an entry to the data's mapvoidsetLevel(@Nullable SentryLevel level)Sets the levelvoidsetMessage(@Nullable java.lang.String message)Sets the messagevoidsetType(@Nullable java.lang.String type)Sets the typestatic @NotNull Breadcrumbtransaction(@NotNull java.lang.String message)Creates transaction breadcrumb - describing a tracing event.static @NotNull Breadcrumbui(@NotNull java.lang.String category, @NotNull java.lang.String message)Creates ui breadcrumb - a user interaction with your app's UI.static @NotNull Breadcrumbuser(@NotNull java.lang.String category, @NotNull java.lang.String message)Creates user breadcrumb - a user interaction with your app's UI.
-
-
-
Constructor Detail
-
Breadcrumb
public Breadcrumb(@NotNull @NotNull java.util.Date timestamp)Breadcrumb ctor- Parameters:
timestamp- the timestamp
-
Breadcrumb
public Breadcrumb()
Breadcrumb ctor
-
Breadcrumb
public Breadcrumb(@Nullable @Nullable java.lang.String message)Breadcrumb ctor- Parameters:
message- the message
-
-
Method Detail
-
http
@NotNull public static @NotNull Breadcrumb http(@NotNull @NotNull java.lang.String url, @NotNull @NotNull java.lang.String method)
Creates HTTP breadcrumb.- Parameters:
url- - the request URLmethod- - the request method- Returns:
- the breadcrumb
-
http
@NotNull public static @NotNull Breadcrumb http(@NotNull @NotNull java.lang.String url, @NotNull @NotNull java.lang.String method, @Nullable @Nullable java.lang.Integer code)
Creates HTTP breadcrumb.- Parameters:
url- - the request URLmethod- - the request methodcode- - the code result. Code can be null when http request did not finish or ended with network error- Returns:
- the breadcrumb
-
navigation
@NotNull public static @NotNull Breadcrumb navigation(@NotNull @NotNull java.lang.String from, @NotNull @NotNull java.lang.String to)
Creates navigation breadcrumb - a navigation event can be a URL change in a web application, or a UI transition in a mobile or desktop application, etc.- Parameters:
from- - the original application state / locationto- - the new application state / location- Returns:
- the breadcrumb
-
transaction
@NotNull public static @NotNull Breadcrumb transaction(@NotNull @NotNull java.lang.String message)
Creates transaction breadcrumb - describing a tracing event.- Parameters:
message- - the message- Returns:
- the breadcrumb
-
debug
@NotNull public static @NotNull Breadcrumb debug(@NotNull @NotNull java.lang.String message)
Creates debug breadcrumb - typically a log message. The data part is entirely undefined and as such, completely rendered as a key/value table.- Parameters:
message- - the message- Returns:
- the breadcrumb
-
error
@NotNull public static @NotNull Breadcrumb error(@NotNull @NotNull java.lang.String message)
Creates error breadcrumb.- Parameters:
message- - the message- Returns:
- the breadcrumb
-
info
@NotNull public static @NotNull Breadcrumb info(@NotNull @NotNull java.lang.String message)
Creates info breadcrumb - information that helps identify the root cause of the issue or for whom the error occurred.- Parameters:
message- - the message- Returns:
- the breadcrumb
-
query
@NotNull public static @NotNull Breadcrumb query(@NotNull @NotNull java.lang.String message)
Creates query breadcrumb - representing a query that was made in your application.- Parameters:
message- - the message- Returns:
- the breadcrumb
-
ui
@NotNull public static @NotNull Breadcrumb ui(@NotNull @NotNull java.lang.String category, @NotNull @NotNull java.lang.String message)
Creates ui breadcrumb - a user interaction with your app's UI.- Parameters:
category- - the category, for example "click"message- - the message- Returns:
- the breadcrumb
-
user
@NotNull public static @NotNull Breadcrumb user(@NotNull @NotNull java.lang.String category, @NotNull @NotNull java.lang.String message)
Creates user breadcrumb - a user interaction with your app's UI.- Parameters:
message- - the message- Returns:
- the breadcrumb
-
getTimestamp
@NotNull public @NotNull java.util.Date getTimestamp()
Returns the Breadcrumb's timestamp- Returns:
- the timestamp
-
getMessage
@Nullable public @Nullable java.lang.String getMessage()
Returns the message- Returns:
- the message
-
setMessage
public void setMessage(@Nullable @Nullable java.lang.String message)Sets the message- Parameters:
message- the message
-
getType
@Nullable public @Nullable java.lang.String getType()
Returns the type- Returns:
- the type
-
setType
public void setType(@Nullable @Nullable java.lang.String type)Sets the type- Parameters:
type- the type
-
getData
@Internal @NotNull public @NotNull java.util.Map<java.lang.String,java.lang.Object> getData()
Returns the data map- Returns:
- the data map
-
getData
@Nullable public @Nullable java.lang.Object getData(@NotNull @NotNull java.lang.String key)Returns the value of data[key] or null- Parameters:
key- the key- Returns:
- the value or null
-
setData
public void setData(@NotNull @NotNull java.lang.String key, @NotNull @NotNull java.lang.Object value)Sets an entry to the data's map- Parameters:
key- the keyvalue- the value
-
removeData
public void removeData(@NotNull @NotNull java.lang.String key)Removes an entry from the data's map- Parameters:
key- the key
-
getCategory
@Nullable public @Nullable java.lang.String getCategory()
Returns the category- Returns:
- the category
-
setCategory
public void setCategory(@Nullable @Nullable java.lang.String category)Sets the category- Parameters:
category- the category
-
getLevel
@Nullable public @Nullable SentryLevel getLevel()
Returns the SentryLevel- Returns:
- the level
-
setLevel
public void setLevel(@Nullable @Nullable SentryLevel level)Sets the level- Parameters:
level- the level
-
acceptUnknownProperties
@Internal public void acceptUnknownProperties(@NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> unknown)Sets the unknown fields, internal usage only- Specified by:
acceptUnknownPropertiesin interfaceIUnknownPropertiesConsumer- Parameters:
unknown- the unknown's map
-
-