• Stars
    star
    281
  • Rank 147,023 (Top 3 %)
  • Language
    Elixir
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🟪 AppSignal for Elixir package

AppSignal for Elixir

Build Status Hex pm

AppSignal for Elixir monitors errors, performance and servers for Elixir applications.

Installation

Please follow the installation guide on how to install and use this library.

Then, add custom instrumentation or use one of the framework integrations to automatically gain performance insights and error notifications. Currently, AppSignal has framework integrations for Plug and Phoenix and applications.

Usage

AppSignal will automatically monitor requests, report any exceptions that are thrown and any performance issues that might have occurred.

You can also add extra information to requests by adding custom instrumentation. Read more in our instrumentation guide.

Configuration

A complete list of all configurable options for AppSignal for Elixir is available in our documentation.

Development

Setup

Before you can start developing on the AppSignal for Elixir project make sure you have Elixir installed.

This repository is managed by mono. Install mono on your local machine by following the mono installation steps.

Then make sure you have all the project's dependencies installed by running the following command:

$ mono bootstrap

Testing

Testing is done with ExUnit and can be run with the mix test command. You can also supply a path to a specific file path you want to test and even a specific line on which the test you want to run is defined.

$ mono test
# The original command can still be used
$ mix test
$ mix test test/appsignal/some_test.ex:123

This project has several different test suites defined with different mix environments. You can run them by specifying the specific type of test suite in the MIX_ENV environment variable.

# Default
$ MIX_ENV=test mix test

# Run the test suite with the NIF inoperational. This will generate errors
# because the NIF is not active, but should run without failures.
$ MIX_ENV=test_no_nif mix test

Benchmarking

This package uses benchee to benchmark code. To run the benchmarker:

$ MIX_ENV=bench mix run bench/<file>.exs

AddressSanitizer

A memory testing setup is included to detect memory errors in the NIF. It's set up in a Docker container to ensure reproducability.

To run the tests, build the container, which will build a version of the NIF with AddressSanitizer enabled. Then, run it with an APPSIGNAL_PUSH_API_KEY and APPSIGNAL_APP_NAME set to ensure AppSignal is enabled, and to be able to verify that data appears in AppSignal after running the test:

docker build --platform linux/amd64 -t appsignal-elixir-asan .
docker run \
  --env APPSIGNAL_PUSH_API_KEY=00000000-0000-0000-0000-000000000000 \
  --env APPSIGNAL_APP_NAME="appsignal-elixir" \
  --rm \
  -- \
  appsignal-elixir-asan

This test runs spans.exs, which is a script that calls most functions in the NIF.

Branches and versions

The main branch corresponds to the current release of the library. The develop branch is used for development of features that will end up in the next minor release. If you fix a bug open a pull request on main, if it's a new feature on develop.

Making changes

When making changes to the project that require a release, add a changeset that will be used to update the generated CHANGELOG.md file upon release.

$ mono changeset add

Publishing new versions

  1. Merge the develop branch to main if necessary.

Updating the CI build matrix

  1. Update .semaphore/versions.rb to add or remove Elixir/OTP versions, or .semaphore/semaphore.yml.erb.
  2. Run script/generate_ci_matrix.

Contributing

Thinking of contributing to our Elixir package? Awesome! 🚀

Please follow our Contributing guide in our documentation and follow our Code of Conduct.

Also, we would be very happy to send you Stroopwafles. Have look at everyone we send a package to so far on our Stroopwafles page.

Support

Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.

Also see our SUPPORT.md file.

License

The AppSignal for Elixir package source code is released under the MIT License. Check the LICENSE file for more information.

More Repositories

1

appsignal-ruby

🟥 AppSignal for Ruby gem
Ruby
181
star
2

mongo-rust-driver

Mongo Rust driver built on top of the Mongo C driver
Rust
89
star
3

appsignal-nodejs

🟩 AppSignal for Node.js
TypeScript
28
star
4

sql_lexer

Rust library to lex and sanitize SQL
Rust
20
star
5

appsignal-elixir-phoenix

Elixir
19
star
6

appsignal-javascript

🟨 AppSignal for JavaScript
TypeScript
19
star
7

probes-rs

Rust library to read out system stats from a machine running Unix
Rust
15
star
8

mono

Multi language tool for managing single and mono repository packages
Ruby
10
star
9

actions-runner

Our GitHub Actions runner (Runs our tests in a Firecracker VM)
Rust
8
star
10

appsignal-examples

Example apps that integrate with AppSignal.
7
star
11

appsignal-python

🟦 AppSignal for Python package
Python
6
star
12

processmon

Process monitor that can run trigger scripts and subsequently restarts the process when files on specified paths are modified.
Rust
6
star
13

c_from_ruby_example

Example to go with the Ruby Magic blog post.
Ruby
5
star
14

statsd_parser

(Dog)StatsD parser written in Rust
Rust
5
star
15

kafka-talk-demo

Demo to go with the talk "Processing streaming data at a large scale with kafka"
Ruby
5
star
16

test-setups

AppSignal test setups
Ruby
2
star
17

appsignal-elixir-plug

Elixir
2
star
18

appsignal-rs

Proof of concept AppSignal integration for Rust
Rust
1
star
19

appsignal-status

Public status page
JavaScript
1
star
20

appsignal-station

JavaScript
1
star
21

appsignal-redis

Add Active::Support.instrument calls to redis queries.
Ruby
1
star
22

appsignal-kafka-statsd-interceptor

Kotlin
1
star
23

mio-worker

Simple worker running on top of Mio that can handle messages, timeouts and IO.
Rust
1
star
24

design-system-old

The New Design System
CSS
1
star
25

frontend-test-setups

This repository contains a set of frontend apps to test with.
HTML
1
star
26

appsignal-hiring

A repository containing a Next.JS app with a component skeleton we'd like candiates to complete.
JavaScript
1
star
27

opentelemetry-instrumentation-bullmq

OTel Auto-instrumentation for BullMQ
TypeScript
1
star