Skip to content

fix(core): service OTel fix#3295

Open
pflynn-virtru wants to merge 6 commits intomainfrom
feat/service-trace-context-interceptor
Open

fix(core): service OTel fix#3295
pflynn-virtru wants to merge 6 commits intomainfrom
feat/service-trace-context-interceptor

Conversation

@pflynn-virtru
Copy link
Copy Markdown
Member

@pflynn-virtru pflynn-virtru commented Apr 10, 2026

Summary

  • Adds ConnectClientTraceInterceptor() and ConnectServerTraceInterceptor() in service/tracing/ for OTel trace propagation via W3C traceparent/tracestate headers
  • Both implement the full connect.Interceptor interface (unary + streaming)
  • Server interceptor wired as the first handler interceptor in newConnectRPC() — applies globally to both external and IPC Connect servers
  • Client interceptor wired into:
    • IPC client chain (inProcessServer.Conn())
    • Remote ERS connection (setupERSConnection())
  • Removes 5 redundant per-handler propagator.Extract() calls from authorization service handlers (now handled globally by the server interceptor)
  • Fixes an ordering bug where spans were started before trace context was extracted, making them root spans instead of children of the incoming trace

Context

Distributed traces break at Connect RPC boundaries because no trace context headers were injected/extracted. This PR closes the gap for all server-side inbound requests, IPC outbound calls, and remote ERS outbound calls. External SDK callers can opt in via WithExtraClientOptions(connect.WithInterceptors(...)).

Test plan

  • cd service && go build ./... compiles
  • go test ./tracing/ — end-to-end unary + server-streaming propagation tests, no-op propagator safety test
  • go test ./internal/server/ — interceptor count and ordering tests updated
  • go test ./authorization/ ./authorization/v2/ — authorization tests pass
  • golangci-lint run ./tracing/ ./internal/server/ ./authorization/ ./authorization/v2/ ./pkg/server/ — 0 issues
  • No new module dependencies

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements
    • Added automatic OpenTelemetry tracing for Connect RPCs so spans are consistently created across requests.
  • Tests
    • Added end-to-end tests validating trace context propagation for unary and streaming RPCs and behavior when no propagator is configured.
  • Chores
    • Added OpenTelemetry Connect integration dependency.

@pflynn-virtru pflynn-virtru requested a review from a team as a code owner April 10, 2026 14:30
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5f604a8f-077c-4b48-85ac-13f469c1f6b1

📥 Commits

Reviewing files that changed from the base of the PR and between b10ceb6 and c19e4ca.

📒 Files selected for processing (1)
  • service/pkg/server/start.go

📝 Walkthrough

Walkthrough

Moved OpenTelemetry trace-context extraction out of handlers into Connect RPC interceptors; added otelconnect-based client/server interceptors, integrated them into server and outbound client chains, and added tests for trace-context propagation.

Changes

Cohort / File(s) Summary
Trace interceptor implementation & tests
service/tracing/connect_interceptor.go, service/tracing/connect_interceptor_test.go
Added ConnectClientTraceInterceptor() and ConnectServerTraceInterceptor() (wrapping otelconnect) and tests verifying trace-context propagation for unary and server-streaming RPCs and propagator-aware behavior.
Authorization handlers
service/authorization/authorization.go, service/authorization/v2/authorization.go
Removed per-handler OpenTelemetry propagator/imports and header-based trace-context extraction; handlers now start spans using the ctx provided by interceptors.
Server integration & tests
service/internal/server/server.go, service/internal/server/server_test.go
Prepended the server trace interceptor to inbound Connect interceptors; conditionally prepend client trace interceptor for in-process outbound client; updated tests to expect one additional interceptor.
ERS outbound client
service/pkg/server/start.go
Attempt to create and append the Connect client trace interceptor to ERS outbound Connect client options; on creation failure, log and continue without it.
Go module
service/go.mod
Added dependency connectrpc.com/otelconnect v0.9.0.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant CCI as Connect Client Trace Interceptor
    participant Network as Network / HTTP
    participant SCI as Connect Server Trace Interceptor
    participant Handler as Service Handler
    participant OTel as OpenTelemetry

    Client->>CCI: start client span and invoke RPC
    CCI->>OTel: read global propagator & span context
    CCI->>Network: inject trace headers and send request
    Network->>SCI: deliver request with trace headers
    SCI->>OTel: extract context via global propagator
    SCI->>Handler: invoke handler with extracted/linked ctx
    Handler->>Handler: perform work (span active)
    Handler-->>SCI: return response
    SCI-->>CCI: response flows back
    CCI-->>Client: client receives response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • jakedoublev
  • elizabethhealy

Poem

🐰 I hopped through headers, light and fleet,
Placed tracing where interceptors meet,
Spans now travel, neat and bright,
From client hop to server light,
A rabbit’s trail across the byte.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 77.78% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title "fix(core): service OTel fix" is vague and does not clearly convey the main changes. It uses generic terminology ("OTel fix") without specifying what was fixed or improved. Revise the title to be more specific and descriptive, such as "fix(core): add Connect interceptors for OpenTelemetry trace propagation" or "fix(core): implement server-side trace context propagation in authorization handlers".
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/service-trace-context-interceptor

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request implements a centralized approach to distributed tracing for Connect RPC services. By moving trace context extraction and propagation into global interceptors, it ensures consistent trace continuity across service boundaries while significantly reducing boilerplate code in individual handlers.

Highlights

  • Global Trace Context Extraction: Introduced ConnectServerTraceInterceptor to automatically extract W3C trace context headers from incoming Connect RPC requests.
  • Outbound Trace Propagation: Added sdk.TraceContextInterceptor to the IPC client interceptor chain to ensure trace continuity for outbound requests.
  • Code Cleanup: Removed redundant manual trace context extraction logic from multiple authorization service handlers.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.


The headers arrive with a trace, / We capture them all in one place. / No more manual calls, / As the context now falls, / Into place with a elegant grace.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 210.733109ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 106.347891ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 415.278157ms
Throughput 240.80 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 41.883238576s
Average Latency 417.523552ms
Throughput 119.38 requests/second

@github-actions
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request centralizes OpenTelemetry trace context extraction by replacing manual extraction in individual authorization service methods with a global Connect RPC interceptor. A new ConnectServerTraceInterceptor is introduced and integrated into the server's interceptor chain, and outbound IPC calls are updated to propagate trace context. Feedback suggests expanding the new interceptor to support streaming RPCs by implementing the full connect.Interceptor interface, ensuring complete trace continuity across all request types.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 193.02863ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 102.1582ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 402.757562ms
Throughput 248.29 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 40.015900053s
Average Latency 398.551901ms
Throughput 124.95 requests/second

Add client and server Connect interceptors for OTel trace propagation:

- ConnectServerTraceInterceptor: extracts traceparent/tracestate from
  incoming requests; wired as the first handler interceptor globally
- ConnectClientTraceInterceptor: injects trace context into outbound
  IPC requests; wired as the first IPC client interceptor

Remove redundant per-handler trace extraction from authorization
service handlers. This also fixes an ordering bug where spans were
started before trace context was extracted, causing them to be root
spans instead of children of the incoming trace.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Paul Flynn <pflynn-virtru@users.noreply.github.com>
@pflynn-virtru pflynn-virtru force-pushed the feat/service-trace-context-interceptor branch from 214095c to d81c299 Compare April 10, 2026 14:53
@pflynn-virtru pflynn-virtru changed the title feat(service): add global trace context interceptor for Connect RPC feat(service): add Connect RPC trace context interceptors Apr 10, 2026
@pflynn-virtru pflynn-virtru changed the base branch from feat/sdk-trace-context-interceptor to main April 10, 2026 14:53
@pflynn-virtru pflynn-virtru marked this pull request as draft April 10, 2026 14:54
@pflynn-virtru pflynn-virtru changed the title feat(service): add Connect RPC trace context interceptors fix(core): add Connect RPC trace context interceptors Apr 10, 2026
@pflynn-virtru pflynn-virtru changed the title fix(core): add Connect RPC trace context interceptors fix(core): OTel fix Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 184.935569ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 97.885959ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 376.906845ms
Throughput 265.32 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 39.881437642s
Average Latency 397.385509ms
Throughput 125.37 requests/second

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@service/internal/server/server_test.go`:
- Around line 557-583: The test currently only checks interceptor counts (fields
like wantIntLen, wantDescription, authInt, extraInts, noopInterceptor()) but not
ordering; add an ordering assertion in the interceptor-ordering test by
replacing or augmenting the authInt with a test auth interceptor that asserts
the trace context extracted earlier is present in ctx (e.g., inspect whatever
key the trace interceptor sets or use the trace-extraction API the code uses)
and fails the test if it's missing, then invoke the interceptor chain (using
connect.Interceptor semantics) so the trace interceptor runs before auth and the
auth interceptor can validate the extracted trace context; this proves auth sees
the extracted trace and prevents regressions if order changes.

In `@service/tracing/connect_interceptor_test.go`:
- Around line 110-139: TestTraceContextPropagation_NoTraceContext currently
calls client.CallUnary with context.Background(), so even if a real propagator
existed the server would still see an invalid TraceID; to make the test actually
assert that a no-op propagator prevents propagation, create an active parent
span on the client side before calling the RPC (use otel.Tracer(...).Start to
get a ctx with a span) and call client.CallUnary with that ctx; then verify
serverTraceID is invalid (SpanContextFromContext(ctx).TraceID() remains empty)
while keeping the test wrapped with setting
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator()) and using
tracing.ConnectClientTraceInterceptor()/tracing.ConnectServerTraceInterceptor()
to exercise the interceptors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 95bb8ade-686e-4414-a25c-57ad0437797d

📥 Commits

Reviewing files that changed from the base of the PR and between 046374a and d81c299.

📒 Files selected for processing (6)
  • service/authorization/authorization.go
  • service/authorization/v2/authorization.go
  • service/internal/server/server.go
  • service/internal/server/server_test.go
  • service/tracing/connect_interceptor.go
  • service/tracing/connect_interceptor_test.go
💤 Files with no reviewable changes (2)
  • service/authorization/authorization.go
  • service/authorization/v2/authorization.go

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 208.496148ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 107.06752ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 412.691802ms
Throughput 242.31 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 42.545181041s
Average Latency 423.185913ms
Throughput 117.52 requests/second

…t, fix no-op test

Address review feedback:
- Implement full connect.Interceptor interface (WrapUnary, WrapStreamingClient,
  WrapStreamingHandler) instead of UnaryInterceptorFunc, so trace context
  propagates for streaming RPCs too
- Fix NoTraceContext test to start a real span on the client side, proving
  the no-op propagator specifically blocks propagation rather than relying
  on the absence of a span

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Paul Flynn <pflynn-virtru@users.noreply.github.com>
@pflynn-virtru pflynn-virtru force-pushed the feat/service-trace-context-interceptor branch from 2b42a60 to 6b8c37b Compare April 10, 2026 15:41
@github-actions
Copy link
Copy Markdown
Contributor

The remote entity resolution connection (setupERSConnection) was built
without any interceptors, so outbound ERS calls from GetDecision had
no trace context propagation. Add ConnectClientTraceInterceptor to
close this gap.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Paul Flynn <pflynn-virtru@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 201.233679ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 98.514445ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 389.435643ms
Throughput 256.78 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 39.913030028s
Average Latency 397.09724ms
Throughput 125.27 requests/second

@github-actions
Copy link
Copy Markdown
Contributor

@pflynn-virtru pflynn-virtru marked this pull request as ready for review April 10, 2026 15:46
@pflynn-virtru pflynn-virtru changed the title fix(core): OTel fix fix(core): service OTel fix Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 200.890251ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 97.86207ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 400.849505ms
Throughput 249.47 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 41.203018438s
Average Latency 410.617954ms
Throughput 121.35 requests/second

@pflynn-virtru pflynn-virtru enabled auto-merge April 10, 2026 16:15
Replace the hand-rolled propagation-only interceptors with
connectrpc.com/otelconnect, which provides per-RPC spans, metrics
(duration, message size, in-flight count), and trace propagation.

Server interceptor uses WithTrustRemote so incoming spans are children
of the remote trace, and WithoutServerPeerAttributes to reduce
cardinality. Both use WithoutTraceEvents to keep spans lean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Paul Flynn <pflynn-virtru@users.noreply.github.com>
@pflynn-virtru pflynn-virtru requested a review from a team as a code owner April 10, 2026 16:50
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 199.113838ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 92.698264ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 426.025015ms
Throughput 234.73 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 44.745756421s
Average Latency 445.779708ms
Throughput 111.74 requests/second

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@service/pkg/server/start.go`:
- Around line 391-396: The tracing interceptor is being appended after the ERS
auth credentials, making tracing inner to auth; call
tracing.ConnectClientTraceInterceptor() and append its result to
ersConnectRPCConn.Options before configureERSAuthentication() (or before any
call that adds interceptor.AddCredentialsConnect()) so the tracing interceptor
is the outermost wrapper; update the order where ersConnectRPCConn.Options are
mutated (refer to ersConnectRPCConn.Options,
tracing.ConnectClientTraceInterceptor(), and
interceptor.AddCredentialsConnect()) to ensure tracing is prepended ahead of the
auth interceptor.

In `@service/tracing/connect_interceptor_test.go`:
- Around line 191-225: The test reads/writes serverTraceID concurrently without
synchronization so the assertion can pass if serverTraceID remains zero (no
server span); protect serverTraceID with a mutex (or atomic) and update the
handler to set serverTraceID under that lock, then before asserting IDs add
require.True(t, serverTraceID.IsValid()) while holding the lock (or loading
atomically) to ensure a server span was created, then assert.NotEqual(t,
clientTraceID, serverTraceID) after releasing/reading the guarded value;
reference serverTraceID and the connect.NewUnaryHandler callback to locate the
changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ab17a902-333e-4fba-b462-4d9d39b5819b

📥 Commits

Reviewing files that changed from the base of the PR and between 9641f7a and b7e3bf2.

⛔ Files ignored due to path filters (1)
  • service/go.sum is excluded by !**/*.sum
📒 Files selected for processing (5)
  • service/go.mod
  • service/internal/server/server.go
  • service/pkg/server/start.go
  • service/tracing/connect_interceptor.go
  • service/tracing/connect_interceptor_test.go

Move ERS trace interceptor before auth configuration so tracing is the
outermost wrapper (spans cover auth latency). Add mutex and validity
assertion to no-propagator test per review feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Paul Flynn <pflynn-virtru@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 195.258647ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 100.480245ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 394.214103ms
Throughput 253.67 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.660541308s
Average Latency 435.085265ms
Throughput 114.52 requests/second

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@service/pkg/server/start.go`:
- Around line 375-379: The code currently returns an error if
tracing.ConnectClientTraceInterceptor() fails, which should be non-fatal;
instead log the failure and continue without tracing. Modify the block that
calls ConnectClientTraceInterceptor() so that on error you emit a warning (using
the existing logger used elsewhere in this file or fmt.Printf if no logger is
available), set ersTraceInt to nil (or leave it unset) and proceed rather than
returning the error—mirroring the non-fatal handling used around
ConnectClientTraceInterceptor() elsewhere (see the handling in server.go lines
that call ConnectClientTraceInterceptor()).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8cdbe2d1-cdc6-4661-960d-733ad1c4b679

📥 Commits

Reviewing files that changed from the base of the PR and between b7e3bf2 and b10ceb6.

📒 Files selected for processing (2)
  • service/pkg/server/start.go
  • service/tracing/connect_interceptor_test.go

Match the IPC path's error handling: log and continue without tracing
rather than preventing the service from starting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Paul Flynn <pflynn-virtru@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 199.834366ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 99.629821ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 386.141485ms
Throughput 258.97 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.131115899s
Average Latency 429.969312ms
Throughput 115.93 requests/second

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Govulncheck found vulnerabilities ⚠️

The following modules have known vulnerabilities:

  • examples
  • sdk
  • service
  • lib/fixtures
  • tests-bdd

See the workflow run for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants