You can use tagging to supply extra context on errors and performance incidents. Tagging can help to add information that is not already part of a request, such as the session data, headers, environment data, or parameters. Tags can also be used to filter on samples within an incident to find all errors for a specific user or slow pages for a particular locale.
You can set tags wherever the current transaction or span is accessible. We recommend calling it before your application code runs in a request, such as a callback. You can see what tags apply to a sample on the Error and Performance incident page.
Using Link Templates it's possible to add links to your application with tag data, such as the admin panel for the signed-in user. You can see this in practice in the below screenshot, with the Link 1
and Link 2
tags.
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.
RubyWith the AppSignal for Ruby gem, use the Appsignal.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.
Tags that do not meet these limitations are dropped without warning.
Use the Appsignal.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.
The set_sample_data
helper can be called multiple times, but only the last value will be retained. When the code is run below:
it will result in the following tags being stored:
Setting sample data on a spanTo add sample data to a span as soon as it's created, add a custom_on_create_fun
:
Then, add it to your app's configuration:
The custom_on_create_fun
requires AppSignal for Elixir version 2.8.3 or higher.
Tags that do not meet these limitations are dropped without warning.
String
or Atom
.String
, Atom
or Integer
.Import the setTag
helper function to add tags to spans for errors and performance samples.
Tags that do not meet these limitations are dropped without warning.
String
.String
, Number
or Boolean
.setCustomData
helper function instead.Import the set_tag
helper method to add tags to spans for errors and performance samples.
Tags that do not meet these limitations are dropped without warning.
set_custom_data
helper function instead.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.
Tags that do not meet these limitations are dropped without warning.
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 the setAttribute
method. The span attribute name has the following format: appsignal.tag.<tag name>
. Replace <tag name>
with the name of the tag.
Tags that do not meet these limitations are dropped without warning.
In a PHP 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 PHP custom instrumentation page.
Then, set an attribute on the span using the setAttribute
method. The span attribute name has the following format: appsignal.tag.<tag name>
. Replace <tag name>
with the name of the tag.
Tags that do not meet these limitations are dropped without warning.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4