- Ruby custom instrumentation
- Elixir custom instrumentation
- Node.js custom instrumentation
- Python custom instrumentation
Event groups
Every event created by AppSignal instrumentation has a name. In this name the parent group of an event is also present. This group name allows AppSignal to group together events from database queries and view rendering. Using this grouping we can create overviews that show execution times per group as well as single events. For example, our Rails integration creates these groups:active_record,
action_view, action_controller, etc.
In AppSignal, you can find these event groups on the Slow
events page, under
Performance in your app’s navigation. It lists each event group with its
mean duration, throughput, and impact. Select a group to see its slowest events.
Apps that send data through OpenTelemetry don’t always have the Slow events
page. If yours doesn’t, use the Slow queries and Slow API requests pages
instead.
The Slow queries and Slow API requests pages list spans by their
OpenTelemetry attributes:
- Slow queries: spans with a database query attribute (
db.query.text,db.statement, ordb.stored_procedure.name). A database system attribute (db.system.nameordb.system) names the database. - Slow API requests: client spans with an HTTP request attribute
(
http.request.methodorhttp.method) and a server name attribute (server.address,net.peer.name, orhttp.server_name). Spans with adb.systemormessaging.systemattribute are not listed.
Event naming
An event name is a string consisting of alphanumeric characters, underscores and periods. Spaces and dashes are not accepted. Think of this regex,([a-zA-Z0-9_.]+), if it is accepted by this regex the event name is accepted.
Let’s start with a simple event name.
Shell
. in a key.
The group is everything after this period.
The group of an event is the code library it belongs to or the kind of action
it is, such as a database query or HTTP request.
It also works with multiple periods in a key.
Shell
other group.
Examples
Some examples of keys that are used by AppSignal integrations:- ActiveRecord:
sql.active_record - Redis:
query.redis - Elasticsearch:
search.elasticsearch - ActionView:
render_template.action_viewandrender_partial.action_view - Ruby’s Net::HTTP:
request.net_http - Sidekiq:
perform_job.sidekiq - Ruby method instrumentation:
method_name.ClassName.other, and;method_name.class_method.NestedClassName.ParentModule.other