-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As `spanName` can be customized with `SpanNameFormatter`, so the `spanName` may not be the same with `http.route`, e.g. the `spanName` can be `GET /users/:id`, but the `http.route` is `/users/:id`. This PR using [`c.FullPath()`](https://github.com/gin-gonic/gin/blob/v1.10.0/context.go#L165-L173) to set `http.route` attribute in `otelgin` to keep `http.route` not affected by `SpanNameFormatter`. --------- Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
- Loading branch information
1 parent
c932948
commit 0430e80
Showing
3 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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