Git Product home page Git Product logo

ballerina-sample-services's Introduction

ballerina-sample-services

This repository contains 4 Ballerina services that I used to test Ballerina Observability. It tests http services, http clients and jdbc clients.

All four service can be run using the following commands. Since all four services can not start up the prometheus endpoint on port 9797, the default port has been overridden.

ballerina run store.bal --b7a.observability.enabled=true 
ballerina run order.bal --b7a.observability.enabled=true --b7a.observability.metrics.prometheus.port=9798 
ballerina run product.bal --b7a.observability.enabled=true --b7a.observability.metrics.prometheus.port=9799 
ballerina run inventory.bal --b7a.observability.enabled=true --b7a.observability.metrics.prometheus.port=9800

Following is a sample prometheus.yml file that can be used to configure prometheus to scrape data from all 4 endpoints. (172.17.0.1 is the docker ip and works for Ubuntu. MAC users might have to use local IP or 0.0.0.0 instead).

global:
  scrape_interval:     15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['172.17.0.1:9797', '172.17.0.1:9798', '172.17.0.1:9799', '172.17.0.1:9800']

Sample cURL command http://localhost:9090/StoreService/processOrder?orderId=2

TODO

Use the observe package to test the tracing and metrics user apis.
Tracing of Ballerina worker interactions.
Error reporting of Services and Clients.
Log reporting to active span.

Supported Version

Ballerina 1.0.0-beta-SNAPSHOT
Language specification 2019R2
Ballerina tool 1.0.0

For more information on Ballerina Observability, Refer https://ballerina.io/learn/how-to-observe-ballerina-code/

ballerina-sample-services's People

Contributors

anoukh avatar grainier avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.