Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable container and Kubernetes awareness for improved telemetry. #1235

Merged
merged 6 commits into from Oct 30, 2023

Conversation

vbabanin
Copy link
Member

@vbabanin vbabanin commented Oct 27, 2023

Include container and Kubernetes awareness, as specified in the MongoDB Handshake Specification

JAVA-5072

@@ -257,6 +257,7 @@ configure(javaCodeCheckedProjects) {
testImplementation 'org.spockframework:spock-core'
testImplementation 'org.spockframework:spock-junit4'
testImplementation("org.mockito:mockito-core:3.8.0")
testImplementation("org.mockito:mockito-inline:3.8.0")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This useful addon to Mockito allows for the mocking of static methods.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@vbabanin vbabanin marked this pull request as ready for review October 27, 2023 23:33
@vbabanin vbabanin requested a review from rozza October 27, 2023 23:35
@@ -168,8 +180,7 @@ static boolean clientMetadataDocumentTooLarge(final BsonDocument document) {
new BsonDocumentCodec().encode(new BsonBinaryWriter(buffer), document, EncoderContext.builder().build());
return buffer.getPosition() > MAXIMUM_CLIENT_METADATA_ENCODED_SIZE;
}

private enum Environment {
private enum FaasEnvironment {
Copy link
Member Author

@vbabanin vbabanin Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the introduction of new parameters in the env section related to containers/orchestration, I've renamed this enum in accordance with the specification, as it contains metadata of FaaS environment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -168,8 +180,7 @@ static boolean clientMetadataDocumentTooLarge(final BsonDocument document) {
new BsonDocumentCodec().encode(new BsonBinaryWriter(buffer), document, EncoderContext.builder().build());
return buffer.getPosition() > MAXIMUM_CLIENT_METADATA_ENCODED_SIZE;
}

private enum Environment {
private enum FaasEnvironment {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

@@ -257,6 +257,7 @@ configure(javaCodeCheckedProjects) {
testImplementation 'org.spockframework:spock-core'
testImplementation 'org.spockframework:spock-junit4'
testImplementation("org.mockito:mockito-core:3.8.0")
testImplementation("org.mockito:mockito-inline:3.8.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@vbabanin vbabanin merged commit fd8352f into mongodb:master Oct 30, 2023
56 checks passed
@vbabanin vbabanin deleted the JAVA-5072 branch October 30, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants