Skip to content

Commit 1add59f

Browse files
authored
---
yaml --- r: 7839 b: refs/heads/tswast-patch-1 c: 5c2248e h: refs/heads/master i: 7837: b5d21e8 7835: f9c213c 7831: 6b92803 7823: e7ad16f 7807: b3805de
1 parent 14348d3 commit 1add59f

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 75baf796423669f5f9faa32a99cc00aa008b348b
60+
refs/heads/tswast-patch-1: 5c2248e3233d5ff4775e680385d791d252e7c8de
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/google-cloud-core/src/main/java/com/google/cloud/GrpcServiceOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ protected ChannelProvider getChannelProvider() {
313313
InstantiatingChannelProvider.Builder builder = InstantiatingChannelProvider.newBuilder()
314314
.setServiceAddress(hostAndPort.getHostText())
315315
.setPort(hostAndPort.getPort())
316-
.setClientLibHeader(getLibraryName(), firstNonNull(getLibraryVersion(), ""));
316+
.setClientLibHeader(getGoogApiClientLibName(), firstNonNull(getLibraryVersion(), ""));
317317
Credentials scopedCredentials = getScopedCredentials();
318318
if (scopedCredentials != null && scopedCredentials != NoCredentials.getInstance()) {
319319
builder.setCredentialsProvider(FixedCredentialsProvider.create(scopedCredentials));

branches/tswast-patch-1/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public abstract class ServiceOptions<ServiceT extends Service<OptionsT>, Service
7474
private static final String MANIFEST_VERSION_KEY = "Implementation-Version";
7575
private static final String ARTIFACT_ID = "google-cloud-core";
7676
private static final String LIBRARY_NAME = "gcloud-java";
77+
private static final String X_GOOGLE_CLIENT_HEADER_NAME = "gccl";
7778
private static final String LIBRARY_VERSION = defaultLibraryVersion();
7879
private static final String APPLICATION_NAME =
7980
LIBRARY_VERSION == null ? LIBRARY_NAME : LIBRARY_NAME + "/" + LIBRARY_VERSION;
@@ -601,6 +602,13 @@ public String getLibraryName() {
601602
return LIBRARY_NAME;
602603
}
603604

605+
/**
606+
* Returns the library's name used by x-goog-api-client header as a string.
607+
*/
608+
public String getGoogApiClientLibName() {
609+
return X_GOOGLE_CLIENT_HEADER_NAME;
610+
}
611+
604612
/**
605613
* Returns the library's version as a string.
606614
*/

0 commit comments

Comments
 (0)