Changelog

Improving AppSignal, one deploy at a time.

Sep 26, 2024

Heartbeat check-ins and other improvements

Elixir2.13.0

Added

  • Add support for heartbeat check-ins.

    Use the Appsignal.CheckIn.heartbeat method to send a single heartbeat check-in event from your application. This can be used, for example, in a GenServer's callback:

    elixir
    @impl true def handle_cast({:process_job, job}, jobs) do Appsignal.CheckIn.heartbeat("job_processor") {:noreply, [job | jobs], {:continue, :process_job}} end
    elixir
    @impl true def handle_cast({:process_job, job}, jobs) do Appsignal.CheckIn.heartbeat("job_processor") {:noreply, [job | jobs], {:continue, :process_job}} end

    Heartbeats are deduplicated and sent asynchronously, without blocking the current thread. Regardless of how often the .heartbeat method is called, at most one heartbeat with the same identifier will be sent every ten seconds.

    Pass continuous: true as the second argument to send heartbeats continuously during the entire lifetime of the current process. This can be used, for example, during a GenServer's initialisation:

    elixir
    @impl true def init(_arg) do Appsignal.CheckIn.heartbeat("my_genserver", continuous: true) {:ok, nil} end
    elixir
    @impl true def init(_arg) do Appsignal.CheckIn.heartbeat("my_genserver", continuous: true) {:ok, nil} end

    You can also use Appsignal.CheckIn.Heartbeat as a supervisor's child process, in order for heartbeats to be sent continuously during the lifetime of the supervisor. This can be used, for example, during an Application's start:

    elixir
    @impl true def start(_type, _args) do Supervisor.start_link([ {Appsignal.CheckIn.Heartbeat, "my_application"} ], strategy: :one_for_one, name: MyApplication.Supervisor) end
    elixir
    @impl true def start(_type, _args) do Supervisor.start_link([ {Appsignal.CheckIn.Heartbeat, "my_application"} ], strategy: :one_for_one, name: MyApplication.Supervisor) end

Changed

  • Send check-ins concurrently. When calling Appsignal.CheckIn.cron, instead of blocking the current process while the check-in events are sent, schedule them to be sent in a separate process.

View the Elixir package v2.13.0 changelog for more information.

Aug 26, 2024

Fix Ecto transactions in parallel preloads

Elixir2.12.3

Fixed

  • Make Appsignal.Ecto.Repo's default_options/1 function overridable. If your Ecto repo uses Appsignal.Ecto.Repo and implements its own default_options/1, it must call super to merge its default options with those of Appsignal.Ecto.Repo:

    elixir
    defmodule MyEctoRepo use Appsignal.Ecto.Repo def default_options(operation) do super(operation) ++ [ # ... your default options here ... ] end end
    elixir
    defmodule MyEctoRepo use Appsignal.Ecto.Repo def default_options(operation) do super(operation) ++ [ # ... your default options here ... ] end end
  • Fix an issue where Ecto transactions in parallel preloads would not be instrumented correctly when using Appsignal.Ecto.Repo, causing the query in the Ecto transaction to not be instrumented and the sample to be incorrectly closed as an earlier time.

View the Elixir package v2.12.3 changelog for more information.

Aug 14, 2024

Rename heartbeats to cron check-ins

Elixir2.12.2

Changed

  • Rename heartbeats to cron check-ins. Calls to Appsignal.heartbeat and Appsignal.Heartbeat should be replaced with calls to Appsignal.CheckIn.cron and Appsignal.CheckIn.Cron, for example:

    elixir
    # Before Appsignal.heartbeat("do_something", fn -> do_something() end) # After Appsignal.CheckIn.cron("do_something", fn -> do_something end)
    elixir
    # Before Appsignal.heartbeat("do_something", fn -> do_something() end) # After Appsignal.CheckIn.cron("do_something", fn -> do_something end)

Deprecated

  • Calls to Appsignal.heartbeat and to methods in Appsignal.Heartbeat will emit a deprecation warning at compile-time.

View the Elixir package v2.12.2 changelog for more information.

Jun 25, 2024

Elixir package v2.12.1

Elixir2.12.1

Fixed

  • When running the installation script on Microsoft Windows, some components threw an error. AppSignal doesn't support Windows, so the installation script won't run on Windows anymore. Preventing errors from raising.

View the Elixir package v2.12.1 changelog for more information.

Jun 05, 2024

Report GraphQL queries by operation names

Elixir2.12.0

Changed

Group GraphQL queries by operation names if available. It will no longer group all errors and performance measurements under the same action name. If no operation name is set, it will use the default action name of the HTTP request route, like POST /graphql.

If you do not wish to use the operation name, or customize the action name for the GraphQL query request, use the Appsignal.Span.set_name in a plug middleware that is called before or after the HTTP request is made:

elixir
Appsignal.Span.set_name(Appsignal.Tracer.root_span(), "MyActionName")
elixir
Appsignal.Span.set_name(Appsignal.Tracer.root_span(), "MyActionName")

See the Elixir package 2.12.0 changelog for more information.

Jun 05, 2024

Allow custom action names to be set

Elixirphoenix 2.3.9

Changed

  • Allow custom action names to be set in Phoenix routes. For example, in a plug middleware or the controller:

    elixir
    Appsignal.Tracer.root_span() |> Appsignal.Span.set_name("CustomActionName")
    elixir
    Appsignal.Tracer.root_span() |> Appsignal.Span.set_name("CustomActionName")

See the changelog for AppSignal for Phoenix package 2.3.9 for more information.

Jun 04, 2024

Error backend turned off by default

Elixir2.11.0

Added

  • Add Appsignal.Span.set_name_if_nil helper. This helper can be used to not overwrite previously set span names, and only set the span name if it wasn't set previously. This will used most commonly in AppSignal created integrations with other libraries to allow apps to set custom span names.

Changed

  • Turn error backend off by default. This will prevent errors from being reported without much context. If you're missing errors after this change, set the enable_error_backend config option to true, and let us know what errors you're missing at support@appsignal.com.
  • Add debug and error logs to probes to better track what it's doing. This is helpful when debugging issues with the minutely probes system.

See the Elixir package 2.11.0 changelog for more information.

May 14, 2024

Support Kamal deployments

Elixir2.10.2

Support Kamal-based deployments. Read the KAMAL_VERSION environment variable, which Kamal exposes within the deployed container, if present, and use it as the application revision if it is not set. This will automatically report deploy markers for applications using Kamal.


See the Elixir package 2.10.2 changelog for more information.

Apr 22, 2024

Add heartbeats and `ignore_logs` config option

Elixir2.10.0

Added

ignore_logs configuration option

Add the ignore_logs configuration option, which can also be configured as the APPSIGNAL_IGNORE_LOGS environment variable.

The value of ignore_logs is a list (comma-separated, when using the environment variable) of log line messages that should be ignored. For example, the value "start" will cause any message containing the word "start" to be ignored. Any log line message containing a value in ignore_logs will not be reported to AppSignal.

The values can use a small subset of regular expression syntax (specifically, ^, $ and .*) to narrow or expand the scope of lines that should be matched.

For example, the value "^start$" can be used to ignore any message that is exactly the word "start", but not messages that merely contain it, like "Process failed to start". The value "Task .* succeeded" can be used to ignore messages about task success regardless of the specific task name.

Heartbeats

Heartbeats are currently only available to beta testers. If you are interested in trying it out, send an email to support@appsignal.com!


Add heartbeats support. You can send heartbeats directly from your code, to track the execution of certain processes:

elixir
def send_invoices do # ... your code here ... Appsignal.heartbeat("send_invoices") end
elixir
def send_invoices do # ... your code here ... Appsignal.heartbeat("send_invoices") end

You can pass a function to Appsignal.heartbeat, to report to AppSignal both when the process starts, and when it finishes, allowing you to see the duration of the process:

elixir
def send_invoices do Appsignal.heartbeat("send_invoices", fn -> # ... your code here ... end) end
elixir
def send_invoices do Appsignal.heartbeat("send_invoices", fn -> # ... your code here ... end) end

If an exception is thrown within the function, the finish event will not be reported to AppSignal, triggering a notification about the missing heartbeat. The exception will bubble outside of the heartbeat function.

Changed

Remove a broken link pointing to a 1.x upgrade page during the installation flow.


See the Elixir package 2.10.0 changelog for more information.

Mar 06, 2024

Improved container CPU metrics

Elixir2.9.0

Added

  • Add histogram support to the OpenTelemetry HTTP server. This allows OpenTelemetry-based instrumentations to report histogram data to AppSignal as distribution metrics.

Changed

  • Breaking change: Normalize CPU metrics for cgroups v1 systems. When we can detect how many CPUs are configured in the container's limits, we will normalize the CPU percentages to a maximum of 100%. This is a breaking change. Triggers for CPU percentages that are configured for a CPU percentage higher than 100% will no longer trigger after this update. Please configure triggers to a percentage with a maximum of 100% CPU percentage.
  • 1566a4a8 patch - Update the Mix config import in the config/appsignal.exs file to use import Config, rather than the deprecated use Mix.Config.
  • Support fractional CPUs for cgroups v2 metrics. Previously a CPU count of 0.5 would be interpreted as 1 CPU. Now it will be correctly seen as half a CPU and calculate CPU percentages accordingly.
  • Update bundled trusted root certificates.

Fixed

  • Fix (sub)traces not being reported in their entirety when the OpenTelemetry exporter sends one trace in multiple export requests. This would be an issue for long running traces, that are exported in several requests.

See the changelog for AppSignal for Elixir package 2.9.0 for more information.

Feb 01, 2024

Add custom_on_create_fun hook for span creation

Elixir2.8.3

Added

  • Set data on spans with the custom_on_create_fun hook. This hook is called upon the creation of every span. This can be useful to add tags to internal traces and otherwise difficult to access traces.

    This won't be necessary for most scenarios. We recommend following our tagging guide instead.

    elixir
    defmodule MyApp.Appsignal do def custom_on_create_fun(_span) do Appsignal.Span.set_sample_data(Appsignal.Tracer.root_span, "tags", %{"locale": "en"}) end end
    elixir
    defmodule MyApp.Appsignal do def custom_on_create_fun(_span) do Appsignal.Span.set_sample_data(Appsignal.Tracer.root_span, "tags", %{"locale": "en"}) end end
    elixir
    # config/config.exs config :appsignal, custom_on_create_fun: &MyApp.Appsignal.custom_on_create_fun/1
    elixir
    # config/config.exs config :appsignal, custom_on_create_fun: &MyApp.Appsignal.custom_on_create_fun/1

Changed

  • Make the debug log message for OpenTelemetry spans from libraries we don't automatically recognize more clear. Mention the span id and the instrumentation library.
  • Fix an issue where queries containing a MySQL leading type indicator would only be partially sanitised.

See the changelog for AppSignal for Elixir package 2.8.3 for more information.

Jan 25, 2024

Add support for Ecto parallel preloads

Elixir2.8.2

Replacing use Ecto.Repo with use Appsignal.Ecto.Repo allows the Ecto instrumentation to keep context across the Elixir processes spawned by Ecto preload queries, ensuring that these queries are correctly instrumented:

elixir
defmodule MyApp.Repo do # replace `use Ecto.Repo` with `use Appsignal.Ecto.Repo` use Appsignal.Ecto.Repo, otp_app: :my_app, adapter: Ecto.Adapters.Postgres end
elixir
defmodule MyApp.Repo do # replace `use Ecto.Repo` with `use Appsignal.Ecto.Repo` use Appsignal.Ecto.Repo, otp_app: :my_app, adapter: Ecto.Adapters.Postgres end

See the changelog for AppSignal for Elixir package 2.8.2 for more information.

Jan 16, 2024

Fix Alpine Linux disk usage metrics and keywords list as sample data

Elixir2.8.1

Changed

  • Fix disk usage returning a Vec with no entries on Alpine Linux when the df --local command fails.

  • Add support for lists in the sample data as root values on spans, as shown below. Previously we only supported lists as nested objects in maps.

    elixir
    Appsignal.Span.set_sample_data( Appsignal.Tracer.root_span, "custom_data", [ "value 1", "value 2" ] )
    elixir
    Appsignal.Span.set_sample_data( Appsignal.Tracer.root_span, "custom_data", [ "value 1", "value 2" ] )

Removed

  • Remove the appsignal_set_host_gauge and appsignal_set_process_gauge extension functions. These functions were already deprecated and did not report any metrics.

Fixed

  • Fix missing error metrics for the error rate and error count graphs in some scenarios, like with Node.js Koa apps.

  • Add support for keywords lists in sample data on spans. These would previously be shown an empty list.

    elixir
    Appsignal.Span.set_sample_data( Appsignal.Tracer.root_span, "custom_data", %{"keyword_list": [foo: "some value", "bar": "other value"]} )
    elixir
    Appsignal.Span.set_sample_data( Appsignal.Tracer.root_span, "custom_data", %{"keyword_list": [foo: "some value", "bar": "other value"]} )

See the changelog for AppSignal for Elixir package 2.8.1 for more information.

Start your free trial

Don’t let the bad bugs bite. Try AppSignal for free.

AppSignal offers a 30-day free trial, no credit card is required. All features are available in all plans. Start monitoring your application in just a few clicks!