Link 1 and Link 2 tags.

Ruby
With the AppSignal for Ruby gem, use theAppsignal.add_tags helper methods to add tags to error and performance samples. On Ruby gem version 3 and older, use the Appsignal.set_tags helper.
You can use Appsignal.add_tags wherever an active transaction is accessible, we recommend calling it before your application code runs in the request, such as in a before_action using Rails.
Default tags
You can configure tags that will be added to all transactions using thedefault_tags config option. These tags are applied automatically to every transaction. Transaction-specific tags set with Appsignal.add_tags will override default tags with the same key.
Limitations
Tags that do not meet these limitations are dropped without warning.- The tag key must be a String or Symbol.
- The tagged value must be a String, Symbol, Integer or Boolean (true/false).
- Boolean values are supported in Ruby gem 3.11 and newer.
- The length of the tag value must be less than 256 characters.
- Nested hash values are not supported for tags, please use custom data instead.
Elixir
Use theAppsignal.Span.set_sample_data function to supply extra context on errors and performance samples. Use the "tags" sample key for the function to add tags to the span.
Last call is leading
Theset_sample_data helper can be called multiple times, but only the last value will be retained. When the code is run below:
Setting sample data on a span
To add sample data to a span as soon as it’s created, add acustom_on_create_fun:
custom_on_create_fun requires AppSignal for Elixir version 2.8.3 or higher.
Limitations
Tags that do not meet these limitations are dropped without warning.- The tag key must be a
StringorAtom. - The tagged value must be a
String,AtomorInteger. - The length of the tag value must be less than 256 characters.
- Nested map values are not supported for tags, please use custom data instead.
Node.js
Import thesetTag helper function to add tags to spans for errors and performance samples.
Limitations
Tags that do not meet these limitations are dropped without warning.- The tag key must be a
String. - The tagged value must be a
String,NumberorBoolean. - The length of the tag value must be less than 256 characters.
- Nested object values are not supported for tags, please use the
setCustomDatahelper function instead.
Python
Import theset_tag helper method to add tags to spans for errors and performance samples.
Limitations
Tags that do not meet these limitations are dropped without warning.- The tag key must be a String.
- The tagged value must be a String, Integer, Float or Boolean.
- The length of the tag value must be less than 256 characters.
- Nested object values are not supported for tags, please use the
set_custom_datahelper function instead.
Go
In a Go app, to add an AppSignal tag to a span on a trace, first fetch the active span or create a new span as described on our Go custom instrumentation page. Then, set an attribute on the span using the attribute helper that matches the type of the tag value, see also the tag limitations below. The span attribute name has the following format:appsignal.tag.<tag name>. Replace <tag name> with the name of the tag.
Limitations
Tags that do not meet these limitations are dropped without warning.- The tag key must be a String.
- The tagged value must be a String, Integer, Float, Boolean, or a slice of those types.
- The length of the tag value must be less than 256 characters.
- Array values are flattened to comma separated values.
- Nested object values (maps) are not supported for tags.
Java
In a Java app, to add an AppSignal tag to a span on a trace, first fetch the active span or create a new span as described on our Java custom instrumentation page. Then, set an attribute on the span using thesetAttribute method. The span attribute name has the following format: appsignal.tag.<tag name>. Replace <tag name> with the name of the tag.
Limitations
Tags that do not meet these limitations are dropped without warning.- The tag key must be a String.
- The tagged value must be a String, Integer, Long, Double, or Boolean, or a list of these values.
- The length of the tag value must be less than 256 characters.
- Array values are flattened to comma separated values.
- Nested object values (maps) are not supported for tags.
PHP
In PHP applications, to add an AppSignal tag to a span on a trace, use theAppsignal::addTags() helper method.
Limitations
Tags that do not meet these limitations are dropped without warning.- The tag key must be a String.
- The tagged value must be a String, Integer, Float, or Boolean, or a slice of these values.
- The length of the tag value must be less than 256 characters.
- Array values are flattened to comma separated values.
- Nested object values (maps) are not supported for tags.