forked from getsentry/sentry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathITransaction.java
More file actions
88 lines (77 loc) · 1.74 KB
/
ITransaction.java
File metadata and controls
88 lines (77 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package io.sentry;
import io.sentry.protocol.Contexts;
import io.sentry.protocol.Request;
import io.sentry.protocol.SentryId;
import java.util.List;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;
public interface ITransaction extends ISpan {
/**
* Sets transaction name.
*
* @param name - transaction name
*/
void setName(@NotNull String name);
/**
* Returns transaction name.
*
* @return transaction name
*/
@NotNull
String getName();
@NotNull
@TestOnly
List<Span> getSpans();
/**
* Returns if transaction is sampled.
*
* @return is sampled
*/
@Nullable
Boolean isSampled();
/**
* Returns the latest span that is not finished.
*
* @return span or null if not found.
*/
@Nullable
Span getLatestActiveSpan();
/**
* Returns transaction's event id.
*
* @return the event id
*/
@NotNull
SentryId getEventId();
/**
* Attaches request information to the transaction.
*
* @param request the request
* @deprecated use {@link Scope#setRequest(Request)}
*/
@Deprecated
@ApiStatus.ScheduledForRemoval
void setRequest(@Nullable Request request);
/**
* Returns the request information from the transaction
*
* @return the request or {@code null} if not set
* @deprecated use {@link Scope#getRequest()}
*/
@Nullable
@Deprecated
@ApiStatus.ScheduledForRemoval
Request getRequest();
/**
* Returns contexts associated with the transaction.
*
* @return the contexts
* @deprecated use {@link Scope#getContexts()}
*/
@NotNull
@Deprecated
@ApiStatus.ScheduledForRemoval
Contexts getContexts();
}