Skip to content

Commit

Permalink
Set and read X-Client-Version
Browse files Browse the repository at this point in the history
  • Loading branch information
tellet-q committed Dec 10, 2024
1 parent 8d4a5be commit 1f55480
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jar {
// add git revision and commit time to jar manifest
jar.manifest.attributes['X-Git-Revision'] = git.head().id
jar.manifest.attributes['X-Git-Commit-Time'] = git.head().dateTime.withZoneSameLocal(ZoneOffset.UTC)
jar.manifest.attributes['X-Client-Version'] = project.version
git.close()
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/qdrant/client/QdrantGrpcClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private String getClientVersion() {
Manifest manifest =
new Manifest(Builder.class.getResourceAsStream("/META-INF/MANIFEST.MF"));
Attributes attributes = manifest.getMainAttributes();
clientVersion = attributes.getValue("X-Qdrant-Version");
clientVersion = attributes.getValue("X-Client-Version");
} catch (IOException e) {
logger.warn("Failed to read client version from manifest", e);
}
Expand Down

0 comments on commit 1f55480

Please sign in to comment.