15
15
import datadog .trace .bootstrap .instrumentation .api .AgentSpan ;
16
16
import datadog .trace .bootstrap .instrumentation .api .AgentSpanContext ;
17
17
import datadog .trace .bootstrap .instrumentation .api .AttachableWrapper ;
18
+ import datadog .trace .bootstrap .instrumentation .api .ErrorPriorities ;
19
+ import datadog .trace .bootstrap .instrumentation .api .ResourceNamePriorities ;
18
20
import datadog .trace .bootstrap .instrumentation .api .WithAgentSpan ;
19
21
import io .opentelemetry .api .common .AttributeKey ;
20
22
import io .opentelemetry .api .common .Attributes ;
@@ -105,11 +107,11 @@ public Span setStatus(StatusCode statusCode, String description) {
105
107
if (this .recording ) {
106
108
if (this .statusCode == UNSET ) {
107
109
this .statusCode = statusCode ;
108
- this .delegate .setError (statusCode == ERROR );
110
+ this .delegate .setError (statusCode == ERROR , ErrorPriorities . MANUAL_INSTRUMENTATION );
109
111
this .delegate .setErrorMessage (statusCode == ERROR ? description : null );
110
112
} else if (this .statusCode == ERROR && statusCode == OK ) {
111
113
this .statusCode = statusCode ;
112
- this .delegate .setError (false );
114
+ this .delegate .setError (false , ErrorPriorities . MANUAL_INSTRUMENTATION );
113
115
this .delegate .setErrorMessage (null );
114
116
}
115
117
}
@@ -132,7 +134,7 @@ public Span recordException(Throwable exception, Attributes additionalAttributes
132
134
@ Override
133
135
public Span updateName (String name ) {
134
136
if (this .recording ) {
135
- this .delegate .setResourceName (name );
137
+ this .delegate .setResourceName (name , ResourceNamePriorities . MANUAL_INSTRUMENTATION );
136
138
}
137
139
return this ;
138
140
}
0 commit comments