Skip to content

Commit

Permalink
docs: Rewrite docs for consistent format with other Ash packages (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenseacat authored May 4, 2024
1 parent b63507a commit bb3849b
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 59 deletions.
41 changes: 10 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@
# AshAppsignal

A drop in Ash.Tracer implementation for Appsignal. Follow the appsignal setup
before setting this up.

## Setup
![Logo](https://github.com/ash-project/ash/blob/main/logos/cropped-for-header-black-text.png?raw=true#gh-light-mode-only)
![Logo](https://github.com/ash-project/ash/blob/main/logos/cropped-for-header-white-text.png?raw=true#gh-dark-mode-only)

Add the dependency to your application
[![CI](https://github.com/ash-project/ash_appsignal/actions/workflows/elixir.yml/badge.svg)](https://github.com/ash-project/ash_appsignal/actions/workflows/elixir.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Hex version badge](https://img.shields.io/hexpm/v/ash_appsignal.svg)](https://hex.pm/packages/ash_appsignal)
[![Hexdocs badge](https://img.shields.io/badge/docs-hexdocs-purple)](https://hexdocs.pm/ash_appsignal)

```elixir
def deps do
[
{:ash_appsignal, "~> 0.1.2"}
]
end
```

Add this to your config:

```elixir
# config supports a list, so this can be combined with other tracers
config :ash, :tracer, [AshAppsignal]
# AshAppsignal

# Optionally configure span types to be sent to appsignal. The default is
# [:custom, :action, :flow]
config :ash_appsignal,
trace_types: [
:custom,
:action,
:flow
]
```
Welcome! `AshAppsignal` is an integration between [Ash Framework](https://hexdocs.pm/ash) and the [AppSignal APM](https://www.appsignal.com).

For all available types see the documentation for `Ash.Tracer`
## Tutorials

Thats it! Additional traces & spans from Ash will be displayed in appsignal.
- [Get Started with AshAppsignal](documentation/tutorials/getting-started-with-ash-appsignal.md)
47 changes: 47 additions & 0 deletions documentation/tutorials/getting-started-with-ash-appsignal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Getting Started with AshAppsignal

## Installation

Add `ash_appsignal` to your list of dependencies in `mix.exs`:


```elixir
def deps do
[
{:ash_appsignal, "~> 0.1.2"}
]
end
```

## Configuration

After installing the `ash_appsignal` dependency, add this to your config:

```elixir
# `config` supports a list, so this can be combined with other tracers
config :ash, :tracer, [AshAppsignal]

# Optionally configure span types to be sent to appsignal. The default is
# [:custom, :action, :flow]
# We suggest using this list. It trims down some noisy traces that Ash emits
config :ash_appsignal,
trace_types: [
:custom,
:action,
:changeset,
:validation,
:change,
:before_transaction,
:before_action,
:after_transaction,
:after_action,
:custom_flow_step,
:flow,
:query,
:preparation
]
```

For all available types, see the documentation for `Ash.Tracer`.

Thats it! Additional traces and spans from Ash will now be displayed in AppSignal.
26 changes: 0 additions & 26 deletions documentation/tutorials/trace-with-appsignal.md

This file was deleted.

4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule AshAppsignal.MixProject do
use Mix.Project

@description """
A drop in Ash.Tracer implementation for Appsignal.
The AppSignal APM integration for Ash Framework
"""

@version "0.1.2"
Expand Down Expand Up @@ -34,7 +34,7 @@ defmodule AshAppsignal.MixProject do
logo: "logos/small-logo.png",
extra_section: "GUIDES",
extras: [
"documentation/tutorials/trace-with-appsignal.md"
"documentation/tutorials/getting-started-with-ash-appsignal.md"
],
groups_for_extras: [
Tutorials: ~r'documentation/tutorials',
Expand Down

0 comments on commit bb3849b

Please sign in to comment.