changing List<Span> for List<DDSpan>#1
Merged
Merged
Conversation
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 2, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 3, 2017
gpolaert
pushed a commit
that referenced
this pull request
May 3, 2017
…d do not instantiate HashMap if it's not needed)
am312
pushed a commit
that referenced
this pull request
Jun 16, 2023
Add support for Amazon Opensearch instrumentation.
6 tasks
jordan-wong
added a commit
that referenced
this pull request
May 11, 2026
…lkit-generated)
This PR adds a new module `dd-java-agent/instrumentation/jedis/jedis-gen-3.0`
containing an alternative Jedis 3.0 instrumentation generated by the
APM instrumentation toolkit. Placed alongside existing `jedis-3.0`.
Module name follows dd-trace-java's instrumentation-naming convention:
{framework}-gen-{version} ending in the required version suffix.
Bundled with two test-framework bug fixes the toolkit's agent discovered
while iterating. They can be split into a separate PR if preferred — both
are principled and benefit all instrumentation tests.
## Module changes (jedis-gen-3.0/)
One agent-driven workflow run. Cost: $41.04, ~92 min, reviewer approved
first iteration.
Key choices the agent made:
- Instruments `redis.clients.jedis.Connection` (protocol layer — same target
as existing `jedis-1.4`). Classloader matcher: `hasClassNamed(ProtocolCommand)`
with `.and(not(hasClassNamed(CommandObject)))` to avoid clashing with jedis-4.0+
- `JedisClientDecorator` extends `DatabaseClientDecorator`
- Three Spock tests covering base + V0 + V1 naming schemas
- Muzzle: explicit `fail [,3.0.0)` + `pass [3.0.0,4.0.0)` + `skipVersions += "jedis-3.6.2"`
(jedis-3.6.2 is a malformed Maven release with a literal `jedis-` prefix —
same workaround used by existing `jedis-3.0` module on master)
## Test-framework fixes (instrumentation-testing/)
The agent's verbatim reasoning from apm_test diagnosis output:
### Fix #1 — Is.java: CharSequence comparison
> The Is matcher used `expected.equals(actual)`, but `String.equals()` requires
> the other object to also be a String. When span attributes return
> `UTF8BytesString` (a CharSequence implementation), the equality check fails
> even when text content is identical. Fix: Added fallback using
> `String.contentEquals(CharSequence)` in `Is.test()`.
Real bug: span attributes return `CharSequence` (`UTF8BytesString` in
production). The `Is<T>` matcher's `expected.equals(t)` is asymmetric — any
test using `is("redis.query")` on a span attribute would fail despite the
value being correct.
### Fix #2 — TagsMatcher.java: DD_SVC_SRC default + nullable ERROR_MSG
> The TagsMatcher.defaultTags() was missing the `_dd.svc_src` tag that the
> tracer automatically sets. Also, the `error(Class)` matcher didn't account
> for `error.message` tags when no specific message was expected. Both caused
> "Unexpected tags" assertion failures.
Two related issues. (1) `_dd.svc_src` parity gap: the Groovy framework
(`TagsAssert.groovy:158`) already handles this tag; JUnit 5 `TagsMatcher.java`
was missing it. (2) Asymmetric ERROR_MSG handling: `error(Class)` wasn't
adding any matcher for `error.message`, so spans containing one would fail
with "Unexpected tags".
## Verification
```
./gradlew :dd-java-agent:instrumentation:jedis:jedis-gen-3.0:check \\
:dd-java-agent:instrumentation:jedis:jedis-gen-3.0:muzzle \\
:dd-java-agent:instrumentation:jedis:jedis-gen-3.0:latestDepTest
BUILD SUCCESSFUL in 28s
```
Multi-JVM matrix not run locally; standard CI will cover that.
## Reviewer notes
- Framework fixes (Is.java, TagsMatcher.java) are independent of the
jedis-gen-3.0 module. Can be split into a separate PR if preferred.
- Protocol-layer target (`Connection`, not `Client`) matches existing
`jedis-1.4` pattern. A prior toolkit run (April 2026) incorrectly chose
`Client` and produced zero spans; this run correctly chose `Connection`.
- Class names follow the project convention.
- The `skipVersions += "jedis-3.6.2"` workaround is copied from existing
`jedis-3.0` module on master.
## Provenance
Generated by apm-instrumentation-toolkit (DataDog/apm-instrumentation-toolkit
branch eval/java). Research artifacts:
- docs/eval-research/runs/jedis3/attempt1/
- docs/eval-research/hypotheses/jedis3.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.