We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 629d94b commit 7461ad3Copy full SHA for 7461ad3
docs/platforms/go/common/tracing/instrumentation/custom-instrumentation/index.mdx
@@ -68,6 +68,19 @@ Or you can add data attributes to an existing transaction or span:
68
})
69
```
70
71
+Or you can update existing transaction and span data by:
72
+
73
+```go
74
+ if d := transaction.Data["dataAttr1"]; d != nil {
75
+ transaction.SetData("dataAttr1", d.(int)+42)
76
+ }
77
78
+ if d := span.Data["dataAttr1"]; d != nil {
79
+ span.SetData("dataAttr1", d.(int)+42)
80
81
+ })
82
+```
83
84
To attach data attributes to the transaction and all its spans, you can use `BeforeSendTransaction`:
85
86
```go
0 commit comments