-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change the Filter parameter from *http.Request to *gin.Context #3070
Comments
@soyacen |
I suppose this is the option being mentioned: https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/github.com/gin-gonic/gin/otelgin/option.go#L78 Which is used here: https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/github.com/gin-gonic/gin/otelgin/gintrace.go#L57 @rehanpfmr this should be a straightforward change. If you want to take it, feel free to do so. |
…elemetry#3070 Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com>
FullPath is already being used as the span name, so that half of this ticket can be ignored. |
commit f5116f4472a90ace1b336eecae28589d77311d92 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 25 08:04:38 2024 -0400 Fixing lint error Signed-off-by: Rehan pasha <rehan.pasha@fmr.com> commit 084e672 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 11 14:42:26 2024 +0530 Squashed commit of the following: commit e6f9504a62f70f45c9e742a054ce05187f175176 Author: Pasha, Rehan <Rehan.Pasha@fmr.com> Date: Tue Jun 11 14:34:25 2024 +0530 Update gintrace.go Signed-off-by: Pasha, Rehan <Rehan.Pasha@fmr.com> commit 8f532bdd4dee57093934a2ce3f717b3ad657d0c4 Author: Pasha, Rehan <Rehan.Pasha@fmr.com> Date: Tue Jun 11 14:31:49 2024 +0530 Update option.go Signed-off-by: Pasha, Rehan <Rehan.Pasha@fmr.com> commit 52b9271c55f98f64bd10838209bde7fcced30dcc Merge: ec30e0b1 c7b10074 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 11 14:30:06 2024 +0530 Merge branch 'rehanosp' of https://github.com/fidelity-external-staging/open-telemetry-opentelemetry-go-contrib into rehanosp commit ec30e0b158ca3a00c6df0e5495f34f990a59c153 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 11 14:29:42 2024 +0530 Fixing the test commit c7b10074e6e4b90b16b384fe661d351d8ffbe035 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 11 14:23:20 2024 +0530 Fixing the test commit 969a646a0cf4f0d430fd5fa4255f65c52d5bfee5 Merge: 737ff9e 8b12e62 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 11 14:06:24 2024 +0530 Merge branch 'main' of https://github.com/fidelity-external-staging/open-telemetry-opentelemetry-go-contrib into rehanosp commit 737ff9e Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Fri Jun 7 18:33:59 2024 +0530 Squashed commit of the following: commit 93a2b553456d9bbb19b59da9d1e611ee096412a7 Merge: 73dd86e7 85969a3 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Fri Jun 7 18:25:10 2024 +0530 Merge branch 'main' of https://github.com/fidelity-external-staging/open-telemetry-opentelemetry-go-contrib into rehanosp commit 73dd86e74e37ce595707fd8daa75df1af934706a Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Fri Jun 7 16:17:30 2024 +0530 feat: Update WithGinFilter to use GinFilter type The `WithGinFilter` function in `option.go` has been updated to use the `GinFilter` type instead of the generic `Filter` type. This change ensures that only `GinFilter` instances are added to the list of filters used by the handler. commit c0330a053d35a2294ae2010ab3bc13eb8a6906b3 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Fri Jun 7 15:42:30 2024 +0530 Fixing the filter and adding test open-telemetry#5743 (comment) commit 1facc34 Merge: ce53f63 3488eb8 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue May 28 13:50:32 2024 +0530 Merge branch 'rehanosp' of https://github.com/fidelity-external-staging/open-telemetry-opentelemetry-go-contrib into rehanosp commit ce53f63 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue May 28 13:50:12 2024 +0530 I’ve added my DCO signoff at the project’s request. There are no other changes. Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com> commit 3488eb8 Merge: cce7c22 606c275 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue May 28 13:35:07 2024 +0530 Merge branch 'rehanosp' of https://github.com/fidelity-external-staging/open-telemetry-opentelemetry-go-contrib into rehanosp commit cce7c22 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue May 28 13:34:48 2024 +0530 feat: Add *gin.Context Filter parameter Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com> commit 606c275 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Mon May 20 19:59:53 2024 +0530 feat: Add `*gin.Context` Filter parameter in `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin` open-telemetry#3070 Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com> Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com> Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com>
commit f5116f4472a90ace1b336eecae28589d77311d92 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 25 08:04:38 2024 -0400 Fixing lint error Signed-off-by: Rehan pasha <rehan.pasha@fmr.com> commit 084e672 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 11 14:42:26 2024 +0530 Squashed commit of the following: commit e6f9504a62f70f45c9e742a054ce05187f175176 Author: Pasha, Rehan <Rehan.Pasha@fmr.com> Date: Tue Jun 11 14:34:25 2024 +0530 Update gintrace.go Signed-off-by: Pasha, Rehan <Rehan.Pasha@fmr.com> commit 8f532bdd4dee57093934a2ce3f717b3ad657d0c4 Author: Pasha, Rehan <Rehan.Pasha@fmr.com> Date: Tue Jun 11 14:31:49 2024 +0530 Update option.go Signed-off-by: Pasha, Rehan <Rehan.Pasha@fmr.com> commit 52b9271c55f98f64bd10838209bde7fcced30dcc Merge: ec30e0b1 c7b10074 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 11 14:30:06 2024 +0530 Merge branch 'rehanosp' of https://github.com/fidelity-external-staging/open-telemetry-opentelemetry-go-contrib into rehanosp commit ec30e0b158ca3a00c6df0e5495f34f990a59c153 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 11 14:29:42 2024 +0530 Fixing the test commit c7b10074e6e4b90b16b384fe661d351d8ffbe035 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 11 14:23:20 2024 +0530 Fixing the test commit 969a646a0cf4f0d430fd5fa4255f65c52d5bfee5 Merge: 737ff9e 8b12e62 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue Jun 11 14:06:24 2024 +0530 Merge branch 'main' of https://github.com/fidelity-external-staging/open-telemetry-opentelemetry-go-contrib into rehanosp commit 737ff9e Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Fri Jun 7 18:33:59 2024 +0530 Squashed commit of the following: commit 93a2b553456d9bbb19b59da9d1e611ee096412a7 Merge: 73dd86e7 85969a3 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Fri Jun 7 18:25:10 2024 +0530 Merge branch 'main' of https://github.com/fidelity-external-staging/open-telemetry-opentelemetry-go-contrib into rehanosp commit 73dd86e74e37ce595707fd8daa75df1af934706a Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Fri Jun 7 16:17:30 2024 +0530 feat: Update WithGinFilter to use GinFilter type The `WithGinFilter` function in `option.go` has been updated to use the `GinFilter` type instead of the generic `Filter` type. This change ensures that only `GinFilter` instances are added to the list of filters used by the handler. commit c0330a053d35a2294ae2010ab3bc13eb8a6906b3 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Fri Jun 7 15:42:30 2024 +0530 Fixing the filter and adding test open-telemetry#5743 (comment) commit 1facc34 Merge: ce53f63 3488eb8 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue May 28 13:50:32 2024 +0530 Merge branch 'rehanosp' of https://github.com/fidelity-external-staging/open-telemetry-opentelemetry-go-contrib into rehanosp commit ce53f63 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue May 28 13:50:12 2024 +0530 I’ve added my DCO signoff at the project’s request. There are no other changes. Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com> commit 3488eb8 Merge: cce7c22 606c275 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue May 28 13:35:07 2024 +0530 Merge branch 'rehanosp' of https://github.com/fidelity-external-staging/open-telemetry-opentelemetry-go-contrib into rehanosp commit cce7c22 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Tue May 28 13:34:48 2024 +0530 feat: Add *gin.Context Filter parameter Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com> commit 606c275 Author: Rehan Pasha <rehan.pasha@fmr.com> Date: Mon May 20 19:59:53 2024 +0530 feat: Add `*gin.Context` Filter parameter in `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin` open-telemetry#3070 Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com> Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com> Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com> Signed-off-by: Brian Warner <brian.warner2@fmr.com>
change the Filter parameter from *http.Request to *gin.Context.
gin.Context has FullPath() method, which returns a matched route full path.
// router.GET("/user/:id", func(c *gin.Context) {
// c.FullPath() == "/user/:id" // true
// })
The text was updated successfully, but these errors were encountered: