open-telemetry / open-telemetry/opentelemetry-java-instrumentation
Latency Overhead Issues When Using Redis Pipelines
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1.2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 228
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached lettuce-pipeline-demo.zip and the reported io.opentelemetry.instrumentation.lettuce.v5_1.OpenTelemetryTracing.OpenTelemetrySpan#start() path. Compare the detailed spans produced for the 600,000-command pipeline with the single “pipeline” span described in the report. Done means a documented switch can control detailed pipeline spans while preserving normal execution latency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100