| Langage | Valeurs racines acceptées |
|---|---|
| Ruby | Arrays, Hashes |
| JavaScript | Arrays, Objects |
| Elixir | Lists, Maps |
| Python | Lists, Maps |
| PHP | Arrays, Objects |

Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
| Langage | Valeurs racines acceptées |
|---|---|
| Ruby | Arrays, Hashes |
| JavaScript | Arrays, Objects |
| Elixir | Lists, Maps |
| Python | Lists, Maps |
| PHP | Arrays, Objects |
# Call `add_custom_data` multiple times to add more custom data
# Hash example
Appsignal.add_custom_data(
:stroopwaffle => { :caramel => true },
:market => { :type => "outdoors" }
)
Appsignal.add_custom_data(:market => { :state => :closed })
Appsignal.add_custom_data(:market => { :state => :open })
# Custom data:
# {
# :stroopwaffle => { :caramel => true },
# :market => { :state => :open }
# }
# Array example
Appsignal.add_custom_data(["value 1"])
Appsignal.add_custom_data(["value 2"])
# Custom data: ["value 1", "value 2"]
# Mixed data type example
# The Hash and Array data type cannot be mixed at the root level
Appsignal.add_custom_data(:market => :open)
Appsignal.add_custom_data(["value 1"])
# Custom data: ["value 1"]
# Map
Appsignal.Span.set_sample_data(
Appsignal.Tracer.root_span,
"custom_data",
%{
stroopwaffle: %{
caramel: true,
origin: "market"
}
}
)
# List
Appsignal.Span.set_sample_data(
Appsignal.Tracer.root_span,
"custom_data",
[
"value 1",
"value 2"
]
)
import { setCustomData } from "@appsignal/nodejs";
// Object
setCustomData({
stroopwaffle: {
caramel: true,
origin: "market",
},
});
// Array
setCustomData(["value 1", "value 2"]);
from appsignal import set_custom_data
# Map
set_custom_data({
"stroopwaffle": {
"caramel": true,
"origin": "market"
}
})
# Array
set_custom_data(["value 1", "value 2"])
<?php
use Appsignal\Appsignal;
Appsignal::setCustomData([
'stroopwaffle' => [
'caramel' => true,
'origin' => 'market',
],
]);

Cette page vous a-t-elle été utile ?