Skip to content

Commit d006fc3

Browse files
committed
feat(o11y): reduce visibility of ApiTracerContext methods
1 parent ab29069 commit d006fc3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/ApiTracerContext.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public enum Transport {
7979
* @return the server port, or {@code null} if not set
8080
*/
8181
@Nullable
82-
public abstract Integer serverPort();
82+
abstract Integer serverPort();
8383

8484
/**
8585
* Returns the library metadata associated with the RPC.
@@ -135,7 +135,7 @@ String rpcSystemName() {
135135
* @return the operation type, or {@code null} if not set
136136
*/
137137
@Nullable
138-
public abstract OperationType operationType();
138+
abstract OperationType operationType();
139139

140140
/**
141141
* Returns the HTTP method used for the RPC, in case the RPC is an HttpJson method.
@@ -159,11 +159,11 @@ String rpcSystemName() {
159159

160160
/** The service name of a client (e.g. "bigtable", "spanner"). */
161161
@Nullable
162-
public abstract String serviceName();
162+
abstract String serviceName();
163163

164164
/** The url domain of the request (e.g. "pubsub.googleapis.com"). */
165165
@Nullable
166-
public abstract String urlDomain();
166+
abstract String urlDomain();
167167

168168
@Nullable
169169
protected abstract Supplier<String> destinationResourceIdSupplier();
@@ -173,7 +173,7 @@ String rpcSystemName() {
173173
* //pubsub.googleapis.com/projects/p/locations/l/topics/t).
174174
*/
175175
@Nullable
176-
public String destinationResourceId() {
176+
String destinationResourceId() {
177177
Supplier<String> supplier = destinationResourceIdSupplier();
178178
if (supplier == null) {
179179
return null;
@@ -209,7 +209,7 @@ <RequestT> ApiTracerContext withResourceNameExtractor(
209209
/**
210210
* @return a map of attributes to be included in attempt-level spans
211211
*/
212-
public Map<String, Object> getAttemptAttributes() {
212+
Map<String, Object> getAttemptAttributes() {
213213
Map<String, Object> attributes = new HashMap<>();
214214
if (!Strings.isNullOrEmpty(serverAddress())) {
215215
attributes.put(ObservabilityAttributes.SERVER_ADDRESS_ATTRIBUTE, serverAddress());
@@ -322,15 +322,15 @@ ApiTracerContext merge(ApiTracerContext other) {
322322
return builder.build();
323323
}
324324

325-
public static ApiTracerContext empty() {
325+
static ApiTracerContext empty() {
326326
return newBuilder().setLibraryMetadata(LibraryMetadata.empty()).build();
327327
}
328328

329329
public static Builder newBuilder() {
330330
return new AutoValue_ApiTracerContext.Builder();
331331
}
332332

333-
public abstract Builder toBuilder();
333+
abstract Builder toBuilder();
334334

335335
@AutoValue.Builder
336336
public abstract static class Builder {

0 commit comments

Comments
 (0)