Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Edit the go instrumentation documentation #333

Merged
merged 3 commits into from
Oct 20, 2022
Merged

Edit the go instrumentation documentation #333

merged 3 commits into from
Oct 20, 2022

Conversation

cyriltovena
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@simonswine simonswine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

A rate of 1 will capture a stack trace every other block operation, but your runtime performance will take a hit.
A rate superior to or equal to 2 will set the sampling rate in nanoseconds to sample all blocking events lasting that duration or longer.

## Mutex Profiling
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should provide a flag to enable it for phlare?

}()
```

## Block Profiling
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should provide a flag to enable it for phlare?

import _ "net/http/pprof"
```

By default pprof endpoint will be exposed on the [`http.DefaultServeMux`](https://pkg.go.dev/net/http#pkg-variables).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Maybe a warning here not accidentally expose it to the public?

@cyriltovena cyriltovena merged commit 79103de into main Oct 20, 2022
@cyriltovena cyriltovena deleted the go-doc branch October 20, 2022 14:01
simonswine pushed a commit to simonswine/pyroscope that referenced this pull request Jun 30, 2023
* Edit the go instrumentation documentation

* Fixes fgprof link

* Review feedbakc
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants