@@ -30,6 +30,7 @@ class SdkReadWriteLogRecord implements ReadWriteLogRecord {
30
30
protected final Severity severity ;
31
31
@ Nullable protected final String severityText ;
32
32
@ Nullable protected final Value <?> body ;
33
+ @ Nullable protected String eventName ;
33
34
private final Object lock = new Object ();
34
35
35
36
@ GuardedBy ("lock" )
@@ -46,7 +47,8 @@ protected SdkReadWriteLogRecord(
46
47
Severity severity ,
47
48
@ Nullable String severityText ,
48
49
@ Nullable Value <?> body ,
49
- @ Nullable AttributesMap attributes ) {
50
+ @ Nullable AttributesMap attributes ,
51
+ @ Nullable String eventName ) {
50
52
this .logLimits = logLimits ;
51
53
this .resource = resource ;
52
54
this .instrumentationScopeInfo = instrumentationScopeInfo ;
@@ -56,6 +58,7 @@ protected SdkReadWriteLogRecord(
56
58
this .severity = severity ;
57
59
this .severityText = severityText ;
58
60
this .body = body ;
61
+ this .eventName = eventName ;
59
62
this .attributes = attributes ;
60
63
}
61
64
@@ -70,7 +73,8 @@ static SdkReadWriteLogRecord create(
70
73
Severity severity ,
71
74
@ Nullable String severityText ,
72
75
@ Nullable Value <?> body ,
73
- @ Nullable AttributesMap attributes ) {
76
+ @ Nullable AttributesMap attributes ,
77
+ @ Nullable String eventName ) {
74
78
return new SdkReadWriteLogRecord (
75
79
logLimits ,
76
80
resource ,
@@ -81,7 +85,8 @@ static SdkReadWriteLogRecord create(
81
85
severity ,
82
86
severityText ,
83
87
body ,
84
- attributes );
88
+ attributes ,
89
+ eventName );
85
90
}
86
91
87
92
@ Override
@@ -122,7 +127,8 @@ public LogRecordData toLogRecordData() {
122
127
severityText ,
123
128
body ,
124
129
getImmutableAttributes (),
125
- attributes == null ? 0 : attributes .getTotalAddedValues ());
130
+ attributes == null ? 0 : attributes .getTotalAddedValues (),
131
+ eventName );
126
132
}
127
133
}
128
134
@@ -168,6 +174,12 @@ public Attributes getAttributes() {
168
174
return getImmutableAttributes ();
169
175
}
170
176
177
+ @ Override
178
+ @ Nullable
179
+ public String getEventName () {
180
+ return eventName ;
181
+ }
182
+
171
183
@ Nullable
172
184
@ Override
173
185
public <T > T getAttribute (AttributeKey <T > key ) {
0 commit comments