Skip to main content
PHP and the languages supported through our OpenTelemetry beta can set function parameters. Function parameters are designated for background jobs and scripts, not for storing parameters for each function call in a trace.
🔐 Do not send Personal Identifiable Information (PII) to AppSignal. Filter PII (e.g., names, emails) and use an ID, hash, or pseudonymized identifier instead.

Use Link Templates to link them back in your app.
For security and privacy we recommend filtering function parameters before sending them to our servers. See the table below for a list of accepted root values per language. Each nested object can contain values that result in valid JSON (strings, integers, floats, booleans, nulls, etc.).
LanguageAccepted root values
GoJSON serialized string
JavaJSON serialized string
PHPArrays, Objects
The below code sample shows how to set custom request parameters:
// Additional setup is required to first fetch or create a new span
import (
	"encoding/json"

	"go.opentelemetry.io/otel/attribute"
	"go.opentelemetry.io/otel/trace"
)

params := map[string]interface{}{
	"param1": "value1",
	"param2": "value2",
	"nested": map[string]interface{}{
		"param3": "value3",
		"param4": "value4",
	},
}
json, _ := json.Marshal(params)
span.SetAttributes(attribute.String("appsignal.function.parameters", string(json)))
For certain languages, additional setup is required. Please follow the instructions for these languages:

Limitations

If the application sets function parameters multiple times, the latest set value is leading.