Skip to content

Commit b8ed3da

Browse files
authored
feat(go): Add a snippet for setting transaction name (#6647)
1 parent 1a7626f commit b8ed3da

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```go
2+
transaction := sentry.TransactionFromContext(ctx)
3+
if transaction != nil {
4+
transaction.Name = "UserListView"
5+
}
6+
```

src/platforms/common/enriching-events/transaction-name.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ supported:
1414
- dart
1515
- java
1616
- android
17+
- go
1718
notSupported:
1819
- javascript.cordova
1920
- javascript.nextjs
@@ -50,7 +51,7 @@ To override the name of the currently running transaction:
5051

5152
<PlatformContent includePath="enriching-events/set-transaction-name" />
5253

53-
<PlatformSection supported={["javascript", "node", "python"]}>
54+
<PlatformSection supported={["javascript", "node", "python", "go"]}>
5455

5556
Please refer to [the tracing documentation](../../performance/) for how to start and stop transactions.
5657

0 commit comments

Comments
 (0)