Skip to content
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

contrib/gin-gonic/gin: correct resource name #574

Merged
merged 1 commit into from
Jan 21, 2020
Merged

contrib/gin-gonic/gin: correct resource name #574

merged 1 commit into from
Jan 21, 2020

Conversation

gbbr
Copy link
Contributor

@gbbr gbbr commented Jan 21, 2020

There was a mistake with setting the resource name for this integration.
We previously had used (*gin.Context).HandlerName to set the resource
which was wrong and returns the name of the function (e.g.
main.main.func1).

This change ensures that the resource name is set correctly, as in all
our HTTP integrations to method and path (e.g. "GET /path")

Updates #558

@gbbr gbbr added this to the 1.21.0 milestone Jan 21, 2020
@gbbr gbbr added bug unintended behavior that has to be fixed apm:ecosystem contrib/* related feature requests or bugs labels Jan 21, 2020
There was a mistake with setting the resource name for this integration.
We previously had used `(*gin.Context).HandlerName` to set the resource
which was wrong and returns the name of the function (e.g.
`main.main.func1`).

This change ensures that the resource name is set correctly, as in all
our HTTP integrations to method and path (e.g. "GET /path")
Copy link
Contributor

@cgilmour cgilmour left a comment

Choose a reason for hiding this comment

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

Looks good.
It shouldn't be submitting anything "identifiable" because FullPath() is essentially the matching mux path.

@gbbr gbbr merged commit b12f0fe into v1 Jan 21, 2020
@gbbr gbbr deleted the gbbr/gin-resource branch January 21, 2020 10:18
knusbaum added a commit that referenced this pull request Feb 7, 2020
mingrammer pushed a commit to mingrammer/dd-trace-go that referenced this pull request Dec 22, 2020
There was a mistake with setting the resource name for this integration.
We previously had used `(*gin.Context).HandlerName` to set the resource
which was wrong and returns the name of the function (e.g.
`main.main.func1`).

This change ensures that the resource name is set correctly, as in all
our HTTP integrations to method and path (e.g. "GET /path")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs bug unintended behavior that has to be fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants