Skip to content

Commit

Permalink
Add OP develop link
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Sep 20, 2023
1 parent 22a80c6 commit dab63ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platform-includes/performance/add-spans-example/go.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ The next example contains the implementation of the hypothetical `doWork` functi

```go
func doWork(ctx context.Context) {
// Set the OP based on values from https://develop.sentry.dev/sdk/performance/span-operations/
span := sentry.StartSpan(ctx, "function")
span.Description = "suboperation1"
// omitted code ...
span.Finish()

// Set the OP based on values from https://develop.sentry.dev/sdk/performance/span-operations/
span := sentry.StartSpan(ctx, "function")
span.Description = "suboperation2"
// omitted code ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
}

options := []sentry.SpanOption{
// Set the OP based on values from https://develop.sentry.dev/sdk/performance/span-operations/
sentry.WithOpName("http.server"),
sentry.ContinueFromRequest(r),
sentry.WithTransactionSource(sentry.SourceURL),
Expand Down

0 comments on commit dab63ec

Please sign in to comment.