Report Spymemcached logical server in stable telemetry by trask · Pull Request #19838 · open-telemetry/opentelemetry-java-instrumentation · GitHub
Skip to content

Report Spymemcached logical server in stable telemetry - #19838

Merged
trask merged 27 commits into
mainfrom
trask-spymemcached-configured-targets
Sep 8, 2026
Merged

trask merged 27 commits into
mainfrom
trask-spymemcached-configured-targets

Conversation

@trask

@trask trask commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

This PR is part of #19899 and applies the configured database target rules proposed in open-telemetry/semantic-conventions#4058 to Spymemcached. Stable spans, db.client.operation.duration metrics, and stable span names report the client's configured direct-node list as the logical target. Legacy telemetry continues to report the selected handling node in server.address and server.port, and #19850 adds handling nodes as network.peer.*.

Multi-endpoint handling

Configured nodes server.address server.port
cache-a:11211,cache-b:11211 cache-a,cache-b Not set
cache-a:11212,cache-b:11212 cache-a:11212,cache-b:11212 Not set
cache-a:11211,cache-b:11212 cache-a:11211,cache-b:11212 Not set

Configured order and duplicate nodes are preserved. Stable telemetry validates every member of the configured list and then includes at most the first five endpoints.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Captures Spymemcached clients’ configured server targets for stable database telemetry while preserving legacy handling-node behavior.

Changes:

  • Captures immutable single- and multi-node targets at connection creation.
  • Uses configured targets for stable span names, attributes, and metrics.
  • Adds unit and integration coverage across semantic-convention modes.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
settings.gradle.kts Registers the unit-test module.
SpymemcachedTest.java Adds configured-target integration coverage.
SpymemcachedSingletons.java Registers the new server extractor.
SpymemcachedServerTargets.java Associates targets with connections.
SpymemcachedServerTarget.java Validates and renders targets.
SpymemcachedServerAttributesExtractor.java Preserves legacy fallback behavior.
SpymemcachedRequest.java Snapshots the configured target.
SpymemcachedInstrumentationModule.java Registers factory instrumentation.
SpymemcachedAttributesGetter.java Exposes stable server attributes.
ConnectionFactoryInstrumentation.java Captures configured node lists.
SpymemcachedServerTargetTest.java Tests target rendering and validation.
SpymemcachedRequestTest.java Tests request target propagation.
SpymemcachedAttributesGetterTest.java Tests semantic-convention attributes.
javaagent-unit-tests/build.gradle.kts Configures isolated semconv tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@trask trask changed the title Use configured targets for Spymemcached Report configured Spymemcached server targets Aug 27, 2026
@trask
trask requested a balanced review from Copilot August 27, 2026 04:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

@trask trask changed the title Report configured Spymemcached server targets Capture the Spymemcached logical server in server.address Aug 29, 2026
@trask
trask requested a balanced review from Copilot August 31, 2026 03:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

@trask
trask requested a balanced review from Copilot August 31, 2026 04:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

@trask
trask requested a balanced review from Copilot August 31, 2026 04:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.

@trask trask changed the title Capture the Spymemcached logical server in server.address Report Spymemcached logical server in stable telemetry Aug 31, 2026
@trask
trask requested a balanced review from Copilot August 31, 2026 06:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.

@trask
trask changed the base branch from main to trask-database-endpoint-utility September 2, 2026 23:09
@trask
trask force-pushed the trask-spymemcached-configured-targets branch from 537cfa3 to 6f2e908 Compare September 3, 2026 16:26
An error occurred while trying to automatically change base from trask-database-endpoint-utility to main September 3, 2026 17:32
Capture each client's configured server list and use it for stable database server attributes while preserving legacy handling-node behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
trask and others added 3 commits September 3, 2026 13:24
Keep complete normalized endpoints from the front of the configured target while capping server.address at 255 characters.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@trask
trask force-pushed the trask-spymemcached-configured-targets branch from 6f2e908 to b8cfeeb Compare September 3, 2026 20:25
@trask
trask changed the base branch from trask-database-endpoint-utility to main September 3, 2026 22:48
trask and others added 14 commits September 3, 2026 17:26
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@trask
trask marked this pull request as ready for review September 4, 2026 14:30
@trask
trask requested a review from a team as a code owner September 4, 2026 14:30
@opentelemetry-pr-dashboard
opentelemetry-pr-dashboard Bot requested a balanced review from Copilot September 4, 2026 14:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The target capture is coherent and well tested; the sole finding is a non-blocking redundant null guard.

Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The configured-target capture and stable-versus-legacy behavior are coherent and adequately covered by tests.

Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@trask
trask merged commit f211b41 into main Sep 8, 2026
192 of 194 checks passed
@trask
trask deleted the trask-spymemcached-configured-targets branch September 8, 2026 14:54
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.

3 participants