Logo of AppSignal

Menu

Ruby gem 2.7:
Improvements and bug fixes

Tom de Bruijn on

We just released AppSignal for Ruby gem version 2.7.0 which allows for longer tag values to be sent, supports more precise values for custom metrics and adds the working_directory_path option to replace working_dir_path.

Longer tags

Previously the tag limit was set to 100 characters. This proved too short for some cases. Values were dropped if they had a length longer than 100 characters to keep samples from becoming too large.

Now, tags for AppSignal transactions (web requests, background jobs, etc.) have a new 256 maximum value limit. Tags aren’t dropped if they exceed the value limit, but they’re truncated to 265 characters if needed.

1
2
Appsignal.tag_request(:tag => "value")
Appsignal.tag_job(:tag =>  "value")

Read more about tagging in our docs.

Doubles for custom metrics

Custom metrics always supported integers as values for the count metric. This allowed you to increment the counter with whole numbers, but not fractions. In Ruby gem 2.7 you can increment the counter by 0.10, 0.20, 0.30, etc. Add that extra bit of precision to your counters!

1
Appsignal.increment_counter("metric_name", 3.14)

Read more about custom metrics in our docs.

New working_directory_path option

In this release we’ve reworked the option that configures where the AppSignal working directory is located. (Read about what the working directory is used for in our docs.)

There already was the working_dir_path option, but it’s behavior wasn’t completely self explanatory. For one, it appended /appsignal to the path.

1
2
3
4
5
# config/appsignal.yml
production:
  working_dir_path: "/tmp/my_app/"
  # would become
  working_dir_path: "/tmp/my_app/appsignal"

Instead working_directory_path will not append the path to the user specified path. It will create the specified path if it does not exist yet.

You can switch to the working_directory_path option without any additional configuration. Do note the /appsignal sub directory will no longer be created.

In this release we’ve also immediatly deprecated the working_dir_path option. Please use working_directory_path instead.

It’s also possible configure the working_directory_path option with an environment variable.

Other improvements

Please see the changelog for more details about these improvements, deprecations and other changes. And as always: get in touch if you encounter problems after upgrading. We’re happy to help!

10 latest articles

Go back

Subscribe to

Ruby Magic

Magicians never share their secrets. But we do. Sign up for our Ruby Magic email series and receive deep insights about garbage collection, memory allocation, concurrency and much more.

We'd like to set cookies, read why.