Conversation
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
August 31, 2026 10:50
433dd31 to
fd83eb2
Compare
giortzisg
marked this pull request as ready for review
August 31, 2026 10:52
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 1, 2026 09:13
fd83eb2 to
bc477c9
Compare
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 1, 2026 12:16
bc477c9 to
2ab55cc
Compare
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 1, 2026 12:57
2ab55cc to
31e7e89
Compare
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 2, 2026 07:59
31e7e89 to
07a88ae
Compare
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 4, 2026 13:12
07a88ae to
553f8ad
Compare
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 4, 2026 13:26
553f8ad to
1f36c07
Compare
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 7, 2026 11:40
1f36c07 to
09507c7
Compare
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 7, 2026 11:50
09507c7 to
f10271c
Compare
szokeasaurusrex
approved these changes
Sep 10, 2026
szokeasaurusrex
left a comment
Member
There was a problem hiding this comment.
lgtm, some minor things
| // Pass in the `.Context()` method from `*sentry.Span` struct. | ||
| // The `context.Context` instance inherits the context from `echo.Context`. | ||
| err := expensiveThing(sentrySpan.Context()) | ||
| // Acquire the transaction from the request context. It may be nil if |
Member
There was a problem hiding this comment.
l: should this say "span" rather than "transaction"?
Suggested change
| // Acquire the transaction from the request context. It may be nil if | |
| // Acquire the span from the request context. It may be nil if |
| context.WithValue(r.Context(), sentry.RequestContextKey, r), | ||
| err, | ||
| ) | ||
| ctx := context.WithValue(r.Context(), sentry.RequestContextKey, r) |
Member
There was a problem hiding this comment.
One question I have: Given we reuse the same sentry.RequestContextKey for all server frameworks, is there a risk of collisions if a user uses two different server frameworks in the same app?
I suppose this would be an edge case but still perhaps worth handling gracefully
Comment on lines
+426
to
+451
| func TestPanicHandlerFuncDoesNotReplaceRequest(t *testing.T) { | ||
| transport := &sentry.MockTransport{} | ||
| client, err := sentry.NewClient(sentry.ClientOptions{ | ||
| Dsn: "http://whatever@example.com/1337", | ||
| Transport: transport, | ||
| }) | ||
| if err != nil { | ||
| t.Fatal(err) | ||
| } | ||
| t.Cleanup(client.Close) | ||
|
|
||
| ctx := sentry.ContextWithClient(context.Background(), client) | ||
| request := httptest.NewRequest(http.MethodGet, "http://example.com/panic", nil).WithContext(ctx) | ||
| info := &negroni.PanicInformation{Request: request, RecoveredPanic: "test"} | ||
|
|
||
| sentrynegroni.PanicHandlerFunc(info) | ||
| if info.Request != request { | ||
| t.Fatal("PanicHandlerFunc replaced the caller's request") | ||
| } | ||
| if ok := client.Flush(testutils.FlushTimeout()); !ok { | ||
| t.Fatal("client flush timed out") | ||
| } | ||
| if got := len(transport.Events()); got != 1 { | ||
| t.Fatalf("captured events = %d, want 1", got) | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
l: This test seems to be mocking quite a lot; is there any way we could instead of creating a simulated PanicInformation actually induce a real panic and try to catch it? If not, I suppose this is a good alternative
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 16, 2026 09:14
f10271c to
38db75f
Compare
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 17, 2026 08:38
38db75f to
d7c5a55
Compare
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 17, 2026 09:09
d7c5a55 to
f0f8c09
Compare
Carry isolated request scopes and spans through native request contexts in Echo, Gin, Iris, and Negroni, and capture panics through the context-backed root API. Read all baggage header values and preserve existing caller contexts and transaction ownership when middleware is nested. Echo, Gin, and Iris GetHubFromContext, SetHubOnContext, and GetSpanFromContext helpers are removed. Use sentry.ScopeFromContext and sentry.SpanFromContext with the framework request context.
giortzisg
removed this pull request from stack #1420
September 18, 2026 11:17
giortzisg
force-pushed
the
scopes/http-framework-integrations
branch
from
September 18, 2026 11:18
f0f8c09 to
f2279a0
Compare
giortzisg
added this pull request to stack #1433
September 18, 2026 11:22
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.
Description
This migrates the remaining http frameworks to the new scopes API.
Issues
Changelog Entry Instructions
To add a custom changelog entry, uncomment the section above. Supports:
For more details: custom changelog entries
Reminders
feat:,fix:,ref:,meta:)