Exposing More Public Endpoints for Sending Metrics and Errors to AppSignal

Robert Beekman

Robert Beekman on

Exposing More Public Endpoints for Sending Metrics and Errors to AppSignal

Today, we launch a new feature: sending metrics and errors to AppSignal over our "Public Endpoint" API.

AppSignal has many web frameworks, databases and background job frameworks automatically instrumented when you want to monitor a Node.js, Ruby or Elixir app.

If you have code running on serverless architecture such as AWS Lambda, you can't run our agent, so our standard integration with all of the out-of-the-box magic won't work.

For this use case we're exposing two new endpoints on our "Public Endpoint" API:

Sending Metrics to AppSignal

This endpoint accepts metrics in a JSON format. Similar to our StatsD Endpoint, this JSON endpoint allows customers that aren't able to use an integration to send metrics over to AppSignal.

[ { "name": "traffic_gauge", "metricType": "gauge", "value": 19.8, "tags": { "hostname": "frontend1" } }, { "name": "error_counter", "metricType": "counter", "value": 10, "tags": { "hostname": "frontend1", "disk": "vda" } }, { "name": "duration_timing", "metricType": "timing", "value": 19, "tags": { "lambda": "login" } }, { "name": "duration_timing", "metricType": "histogram", "value": 5, "tags": { "lambda": "login" } } ]

For more details on supported metrics and the JSON structure, check out our documentation.

Sending Errors to AppSignal

This endpoint allows customers to send errors to AppSignal without using our integrations.

It exposes all the fields used by our integrations, allowing inclusion of all the metadata you are used to seeing in AppSignal such as parameters, tags and breadcrumbs.

An example of the payload that this endpoint accepts is:

{ "action": "BlogpostController#show", "namespace": "frontend", "timestamp": 1559201249, "error": { "name": "StandardError", "message": "Error message", "backtrace": ["backtrace/line:1", "backtrace/line:2"] }, "environment": { "os": "windows", "agent": "super secret user agent" }, "params": { "foo": "bar" }, "tags": { "account_id": "abc-123" }, "revision": "revision-abc", "breadcrumbs": [ { "timestamp": 1559201249, "category": "request", "action": "", "message": "request failed", "metadata": { "code": "not_found" } } ], "language": "javascript" }

To learn more about each field and the format of the JSON payload, see our documentation.

Wrapping Up

AppSignal works out-of-the-box for many setups. But we also let you build a lot of custom things on top of AppSignal. You can build custom dashboards to display data, you can use the GraphQL API to get data out in a raw form and now, you have another way of adding data to AppSignal. So every corner of your architecture can be monitored with AppSignal, and you get the whole picture.

If you are using AppSignal, let us know if you have any wishes for more ways to send data to AppSignal. If you aren't using AppSignal yet, check out how to get started with the APM for Node.js, Ruby (on Rails) and Elixir.

Robert Beekman

Robert Beekman

As a co-founder, Robert wrote our very first commit. He's also our support role-model and knows all about the tiny details in code. Travels and photographs (at the same time).

All articles by Robert Beekman

Become our next author!

Find out more

AppSignal monitors your apps

AppSignal provides insights for Ruby, Rails, Elixir, Phoenix, Node.js, Express and many other frameworks and libraries. We are located in beautiful Amsterdam. We love stroopwafels. If you do too, let us know. We might send you some!

Discover AppSignal
AppSignal monitors your apps