-
Notifications
You must be signed in to change notification settings - Fork 191
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
error: Record transaction.name
when available
#1177
error: Record transaction.name
when available
#1177
Conversation
Adds a new `transaction.name` field which is recorded when a transaction is set for the error. Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
Verified using go.elastic.co/apm/v2 v2.0.0-20220209134054-640a916049c9 (current main). package main
import (
"context"
"errors"
"go.elastic.co/apm/v2"
)
func main() {
tracer := apm.DefaultTracer()
defer tracer.Flush(nil)
tracer.NewError(errors.New("err1")).Send()
tx := tracer.StartTransaction("name", "type")
ctx := apm.ContextWithTransaction(context.Background(), tx)
apm.CaptureError(ctx, errors.New("err2")).Send()
tx.Name = "new_name"
tx.End()
}
|
Description
Adds a new
transaction.name
field which is recorded when a transactionis set for the error.
Related issues
Closes #1154