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

Add support for redisson instrumentation #1132

Merged
merged 7 commits into from
Sep 1, 2020

Conversation

dengliming
Copy link
Member

closes #1061

@trask
Copy link
Member

trask commented Aug 30, 2020

Hey @dengliming, this looks great!

Can you implement dbConnectionString(CONNECTION) also?

// TODO make abstract after implementing in all subclasses
protected String dbConnectionString(CONNECTION connection) {
return null;
}

@dengliming
Copy link
Member Author

Hey @dengliming, this looks great!

Can you implement dbConnectionString(CONNECTION) also?

// TODO make abstract after implementing in all subclasses
protected String dbConnectionString(CONNECTION connection) {
return null;
}

Sure. thanks for quick reply : )

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Thanks, just small and one big point that can probably be saved for later.

if (args instanceof CommandsData) {
List<CommandData<?, ?>> commands = ((CommandsData) args).getCommands();
if (commands != null && !commands.isEmpty()) {
commandName = commands.get(0).getCommand().getName() + "... [bulk]";
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we do any truncation in other places, like Lettuce or DB instrumentation. It probably is a good idea but we should do it consistently for all the instrumentation, how about storing everything for now?

Copy link
Contributor

Choose a reason for hiding this comment

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

Java SDK already supports truncating too large attributes. So this better be left to them :)

}

def "test batch command"() {
when:
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to have a more complete async test with callbacks? I notice the return type is RFuture I wonder if our concurrent instrumentation will apply to it.

https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/master/instrumentation/lettuce/lettuce-5.1/src/test/groovy/io/opentelemetry/instrumentation/auto/lettuce/v5_1/LettuceAsyncClientTest.groovy#L327

We can focus on async in another PR though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing seems to have changed.

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Thanks

})
then:
result.get(3, TimeUnit.SECONDS)
assertTraces(2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, this is a good test! I just noticed our async redis tests don't check context propagation, we can look at that separately #1139

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

Thanks @dengliming!

@trask trask merged commit 8415a90 into open-telemetry:master Sep 1, 2020
@dengliming dengliming deleted the f_redisson branch May 5, 2021 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for redisson instrumentation.
4 participants