Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Examples

The following examples demonstrate how to ingest events from various sources into OpenMeter using Benthos.

The examples use the custom Benthos distribution in this repository.

Prerequisites

These examples require a running OpenMeter instance. If you don't have one, you can sign up for a free trial.

If you are using OpenMeter Cloud, grab a new API token.

Create a meter

In order to see data in OpenMeter, you need to create a meter first.

In OpenMeter Cloud, go to the Meters page and click the Create meter button in the right upper corner. Fill in the details of the meter as instructed by the specific example and click Create.

Tip

You can start ingesting events without creating a meter first, but you won't be able to query data. You can inspect the ingested events in the Event debugger.

In a self-hosted OpenMeter instance you can create a meter in the configuration file:

# ...

meters:
  - slug: api_calls
    eventType: api-calls
    aggregation: SUM
    valueProperty: $.duration_ms
    groupBy:
      method: $.method
      path: $.path

Checking events in OpenMeter

Once you start ingesting events, you can check them in the Event debugger or in the Query page.

If you self-host OpenMeter, you can use the REST API to query data.

Production use

We are actively working on improving the documentation and the examples. In the meantime, feel free to contact us in email or on Discord.

We are more than happy to help you set up OpenMeter in your production environment.