Skip to content

Latency Overhead Issues When Using Redis Pipelines #14989

@123liuziming

Description

@123liuziming

lettuce-pipeline-demo.zip
Here is a demonstration of using Redis pipelines, which inserts 600,000 Redis subcommands(zset) in a single pipeline.

1. With Java Agent:
Pipeline execution completed. Execution time: 11127ms
2. Without Java Agent:
Pipeline execution completed. Execution time: 5167ms

I have observed that overall latency increases by approximately 40% with the Java Agent. I infer this is due to excessive invocations of the io.opentelemetry.instrumentation.lettuce.v5_1.OpenTelemetryTracing.OpenTelemetrySpan#start() method, resulting in a noticeable rise in latency.

Subsequently, I modified the Java Agent so that when using the pipeline in spring-data-redis, then only a single internal span named “pipeline” is generated, with the remaining detailed spans being omitted. Following this change, the overall call duration returned to normal. Should we provide a switch to selectively display the detailed spans within the pipeline?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions