Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ defer profiler.Stop()

The `Start` function accepts the following options:

- `WithAppName`: specifies the Application Name.

- `WithCPUDuration`: specifies the length at which to collect CPU profiles.
The default is 45 seconds. Can also be set via the environment variable `BLACKFIRE_CONPROF_CPU_DURATION`.

Expand All @@ -85,6 +87,13 @@ If the same parameter is set by both an environment variable and a `Start` call,
parameter in the `Start` call takes precedence.
{{% /note %}}

{{< note theme="warning" >}}

On Upsun, `AppName` is set to application name by default. If you override this value via `WithAppName`, you might
not be able to see it on the profiling tab.

{{< /note >}}

There is also some additional configuration that can be done using environment variables:

- `BLACKFIRE_LOG_FILE`: Sets the log file. The default is logging to `stderr`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ The `start` function accepts an object as a parameter with the following keys:

- `uploadTimeoutMillis`: Timeout in milliseconds for the upload request (default: 10000)

{{< note theme="warning" >}}

On Upsun, `appName` is set to application name by default. If you override this value, you might
not be able to see it on the profiling tab.

{{< /note >}}

### `function stop() {}`

Stops the continuous profiling probe.
Expand Down Expand Up @@ -110,4 +117,4 @@ app.listen(port, () => {
3. Run the Node.js server

```bash
node index.js
node index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ The Python profiler API (`profiler`) can be initiated with the following options
- `upload_timeout`: observability data upload timeout. The default is 10 seconds.
- `labels`: a dict containing the custom labels specific to the profile payload that is sent.

{{< note theme="warning" >}}

On Upsun, `application_name` is set to application name by default. If you override this value, you might
not be able to see it on the profiling tab.

{{< /note >}}

The Python continuous profiler API has two functions:

```python
Expand Down
Loading