Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0901784
Add HEEx instrumentation
lancetarn Oct 24, 2025
17d0fcd
Maybe tests
lancetarn Nov 28, 2025
d17b6c4
Working with a modern phoenix app
lancetarn Nov 28, 2025
91944f6
LiveView event telemetry
lancetarn Nov 29, 2025
7fd81d6
Update LiveView for proper naming
lancetarn Nov 29, 2025
bceedc1
Handle core_agent config file path
lancetarn Jan 14, 2026
2858dd2
Update agent version
lancetarn Jan 14, 2026
6204eab
Handle agent already running
lancetarn Jan 15, 2026
863d6a0
Fix dependency and test issues
lancetarn Jan 20, 2026
6eabc77
Add error monitoring capability
lancetarn Jan 20, 2026
847bc0b
Error monitoring documentation
lancetarn Jan 21, 2026
cdb49ea
Initial log management support
lancetarn Jan 21, 2026
21362f2
Log management info in README
lancetarn Jan 22, 2026
10d0d6b
Improve dbmetrics visibility
lancetarn Jan 22, 2026
e358c0e
Improve metadata capture
lancetarn Jan 23, 2026
06ae9cc
External Services support
lancetarn Feb 23, 2026
daaa008
Changelog update
lancetarn Feb 27, 2026
e956291
More lifecycle fixes
lancetarn Mar 5, 2026
e8e6fd5
Fix timestamp attribute data types
lancetarn Mar 5, 2026
7c6d170
Update Scout log attribute names
lancetarn Mar 6, 2026
28a219f
Wrap endpoint stop with stashed info.
lancetarn Mar 6, 2026
d7a8120
Add testing workflow
lancetarn Mar 6, 2026
b751a79
Update with release workflow
lancetarn Mar 6, 2026
44e62f6
Handle core-agent unavailability more gracefully
lancetarn Mar 9, 2026
caec773
Lint fixes
lancetarn Mar 9, 2026
1257714
Fixes for hung/unresponsive owned agent
lancetarn Mar 9, 2026
2434db0
Lint
lancetarn Mar 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
elixir: ['1.17']
otp: ['27']

steps:
- uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Restore deps cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-

- name: Install dependencies
run: mix deps.get

- name: Check formatting
run: mix format --check-formatted

- name: Compile with warnings as errors
run: mix compile --warnings-as-errors

- name: Run tests
run: mix test
101 changes: 101 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
elixir: ['1.17']
otp: ['27']

steps:
- uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Restore deps cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-

- name: Install dependencies
run: mix deps.get

- name: Compile
run: mix compile --warnings-as-errors

- name: Run tests
run: mix test

publish:
needs: test
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.17'
otp-version: '27'

- name: Restore deps cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-

- name: Install dependencies
run: mix deps.get

- name: Verify tag matches mix.exs version
run: |
TAG_VERSION="${GITHUB_REF_NAME#v}"
MIX_VERSION=$(grep 'version:' mix.exs | head -1 | sed 's/.*"\(.*\)".*/\1/')
echo "Tag version: $TAG_VERSION"
echo "Mix version: $MIX_VERSION"
if [ "$TAG_VERSION" != "$MIX_VERSION" ]; then
echo "::error::Tag version ($TAG_VERSION) does not match mix.exs version ($MIX_VERSION)"
exit 1
fi

- name: Publish to Hex.pm
run: mix hex.publish --yes
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG="${GITHUB_REF_NAME}"
VERSION="${TAG#v}"

# Detect pre-release from version string (rc, alpha, beta, dev)
if echo "$VERSION" | grep -qE '[-](rc|alpha|beta|dev)'; then
PRERELEASE="--prerelease"
else
PRERELEASE=""
fi

gh release create "$TAG" \
--title "$TAG" \
--generate-notes \
$PRERELEASE
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# master

# 2.0.0

* New Features
* Error Monitoring — Automatic capture of unhandled exceptions in Phoenix controllers via telemetry. Errors are reported to Scout with full stacktraces, request context, and filtered parameters. Configure with `errors_enabled`, `errors_ignored_exceptions`, and `errors_filter_parameters`.
* Log Management — OTLP-based log forwarding to Scout. Integrates with Elixir's Logger via a custom handler. Supports batched delivery, severity mapping, and automatic context extraction. Configure with `logs_enabled`, `logs_endpoint`, `logs_ingest_key`, `logs_level`, and `logs_filter_modules`.
* External Services (Finch) — Automatic instrumentation of outbound HTTP calls via Finch (and Req) using `:telemetry`. Captures method, URL, status code, and duration.
* External Services (Tesla) — Automatic instrumentation of outbound HTTP calls via Tesla using `:telemetry`. Captures method, URL, status code, and duration.
* LiveView Telemetry — Automatic instrumentation of Phoenix LiveView `mount`, `handle_event`, and `handle_params` callbacks.
* Oban Telemetry — Automatic instrumentation of Oban background job execution. Jobs appear as `Job` type spans.
* HEEx Engine — Template render instrumentation for `.heex` templates (Phoenix 1.6+).
* Database Metrics — Ecto spans now include `db.command` and `db.rows` tags for richer database visibility.
* Metadata Capture — Improved application metadata reporting including Elixir version, loaded libraries, hostname, and git SHA.

* Enhancements
* Update Core Agent to v1.5.0 (from v1.2.6)
* Update telemetry dependency to `~> 1.0` (from `~> 0.3.0 or ~> 0.4.0`)
* Phoenix, phoenix_html, and phoenix_live_view are now optional dependencies (enables compile-time HEEx instrumentation)
* Ecto logger extracts SQL command type and row counts from query results
* Better core agent lifecycle handling (already-running detection, config file path support)
* Default checkin host updated to `checkin.scoutapm.com`

* New Configuration Options
* `errors_enabled` (default: `true`) — Enable/disable error capture
* `errors_host` (default: `https://errors.scoutapm.com`) — Error reporting endpoint
* `errors_batch_size` (default: `5`) — Errors per batch
* `errors_max_queue_size` (default: `500`) — Max queued errors
* `errors_flush_interval_ms` (default: `1000`) — Error flush interval
* `errors_ignored_exceptions` (default: `[]`) — Exception modules to ignore
* `errors_filter_parameters` (default: `[]`) — Parameter keys to redact
* `logs_enabled` (default: `false`) — Enable/disable log forwarding
* `logs_endpoint` (default: `https://otlp.scoutotel.com:4318`) — OTLP log endpoint
* `logs_ingest_key` (default: `nil`) — Ingest API key for log forwarding
* `logs_batch_size` (default: `100`) — Logs per batch
* `logs_max_queue_size` (default: `5000`) — Max queued logs
* `logs_flush_interval_ms` (default: `5000`) — Log flush interval
* `logs_level` (default: `:info`) — Minimum log level to forward
* `logs_filter_modules` (default: `[]`) — Logger modules to exclude
* `log_level` (default: `:info`) — Scout agent's own log level

* Breaking Changes
* Elixir >= 1.14 required (was 1.4)
* Telemetry `~> 1.0` required (was `~> 0.3.0 or ~> 0.4.0`)
* Phoenix `~> 1.6` (optional, was `~> 1.0`)
* Removed `phoenix_slime` dependency
* Removed `credo` dependency

# 1.0.7

* Enhancements
Expand Down
Loading