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

.Ignore() not ignoring transaction (go-agent + nrgin) #845

Closed
gwkline opened this issue Jan 30, 2024 · 6 comments · Fixed by #888
Closed

.Ignore() not ignoring transaction (go-agent + nrgin) #845

gwkline opened this issue Jan 30, 2024 · 6 comments · Fixed by #888
Assignees
Labels

Comments

@gwkline
Copy link

gwkline commented Jan 30, 2024

Description

Hi there! I have a transaction I've been trying to ignore/not see in my NewRelic dashboard. It's a GraphQL subscription (websocket) and for some reason, calling the go-agent .Ignore() method does not seem to be properly ignoring this request.

I am using Gin, so nrgin is initialized in my API's main function. I am using all default options (to the best of my knowledge)
CleanShot 2024-01-29 at 17 59 26

The .Ignore() call is happening in my GraphQL endpoint handler. I know the middleware is all working (as I can see transaction names and variables for my other requests), but Ignore() is... being ignored 😅
CleanShot 2024-01-29 at 18 01 04

Expected Behavior

Calling .Ignore() should not show the transaction at all in the NewRelic dash.

Your Environment

Running in a docker container based off of golang:alpine

go 1.21

require (
	github.com/99designs/gqlgen v0.17.43
	github.com/gin-gonic/gin v1.9.1
	github.com/newrelic/go-agent/v3 v3.29.1
	github.com/newrelic/go-agent/v3/integrations/nrgin v1.2.1
	github.com/newrelic/go-agent/v3/integrations/nrpgx5 v1.2.0
	github.com/rafaelhl/gorm-newrelic-telemetry-plugin v1.0.0
@gwkline gwkline added the bug label Jan 30, 2024
@gwkline gwkline closed this as completed Feb 6, 2024
@gwkline
Copy link
Author

gwkline commented Feb 6, 2024

Ended up having to ignore the transaction in the websocket upgrader as well - seems to be working fine. Apologies!

Edit: nevermind, still not being ignored it would seem

@gwkline gwkline reopened this Feb 6, 2024
@iamemilio iamemilio self-assigned this Mar 5, 2024
@iamemilio
Copy link
Contributor

I'll try to verify the functionality of the ignore method on our end and get back to you.

@iamemilio
Copy link
Contributor

Hi @gwkline, I think that if you enabled debug logs, there might be something in there that will help you or us get closer to a why this is happening. We actually log when transactions are marked ignored, and it would be helpful to just have that verification.

	if txn.Config.Logger.DebugEnabled() {
		txn.Config.Logger.Debug("transaction ended", map[string]interface{}{
			"name":          txn.FinalName,
			"duration_ms":   txn.Duration.Seconds() * 1000.0,
			"ignored":       txn.ignore,
			"app_connected": txn.Reply.RunID != "",
		})
	}

@iamemilio
Copy link
Contributor

you may not want to post debug logs here, so I would recommend opening a support ticket with New Relic if you have access to that.

@iamemilio
Copy link
Contributor

just wrote out this test case, I suspect that this behavior may be more on your end than ours, but please feel free to correct me: https://github.com/newrelic/go-agent/pull/865/files

@iamemilio
Copy link
Contributor

@gwkline may I close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants