Code Monkey home page Code Monkey logo

module-ballerinax-prometheus's Introduction

Ballerina Prometheus Observability Extension

Build GitHub Last Commit License codecov

Building from the Source

Setting Up the Prerequisites

  1. Download and install Java SE Development Kit (JDK) version 17 (from one of the following locations).

    • Oracle

    • OpenJDK

      Note: Set the JAVA_HOME environment variable to the path name of the directory into which you installed JDK.

Building the Source

Execute the commands below to build from source.

  1. To build the library:

     ./gradlew clean build
    
  2. To run the integration tests:

     ./gradlew clean test
    

Available Metrics

The exporter provides the following metrics.

Metric Name Description
response_time_seconds_value Response time of a request in seconds
response_time_seconds_max Maximum response time of a request
response_time_seconds_min Minimum response time of a request
response_time_seconds_mean Average response time of a request
response_time_seconds_stdDev Standard deviation of response time of a request
response_time_seconds Summary of request-response times across various time frames and quantiles
response_time_nanoseconds_total_value Total response time for all requests
requests_total_value Total number of requests
response_errors_total_value Total number of response errors
inprogress_requests_value Total number of inprogress requests
kafka_publishers_value Number of publishers in kafka
kafka_consumers_value Number of consumers in kafka
kafka_errors_value Number of errors happened while publishing in kafka

Contributing to Ballerina

As an open source project, Ballerina welcomes contributions from the community.

For more information, go to the contribution guidelines.

Code of Conduct

All contributors are encouraged to read the Ballerina Code of Conduct.

Useful Links

module-ballerinax-prometheus's People

Contributors

anoukh avatar anupama-pathirage avatar azinneera avatar ballerina-bot avatar gabilang avatar gayaldassanayake avatar grainier avatar ibaqu avatar keizer619 avatar kishanthan avatar madushajg avatar maheshika avatar manuranga avatar maryamzi avatar nadundesilva avatar nipunamadhushan avatar nipunaranasinghe avatar niveathika avatar praveennadarajah avatar pubudu91 avatar supuns avatar tharinduwijewardane avatar thisaruguruge avatar udda1996 avatar warunalakshitha avatar wggihan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

module-ballerinax-prometheus's Issues

Improve grafana dashboard

Description:
Currently the grafana dashboard includes graphs for many categories (HTTP Client, HTTP Service, SQL Client). But sometimes, some categories won't have any data to show. We need to organize the dashboard as well as include some other categories.

Suggested Labels:

Suggested Assignees:

Affected Product Version:

OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

Create a dashboard for Ballerina in Datadog

Description:
As a hyatt demo preparation, we need to create a dashboard for Ballerina Metrics observation in Datadog.
Intially we need to include the graphs that we have already included in Grafana.

As a first step, we can include HTTP Service Metrics and HTTP Client Metrics which are being most frequently used.
Later, we can include SQL Metrics and Graphql Metrics.

Suggested Labels:

Suggested Assignees:

Affected Product Version:

OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

Create a dashboard for graphql service metrics in Grafana

Description:
For wso2 con 24, ballerina team presents a graphql service demo with observability. We need to create a custom dashboard visualizing GraphQL service related metrics.

Suggested Labels:

Suggested Assignees:

Affected Product Version:

OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

Concurrent calls warning when using this module

I've got the following warning when using this module.

HINT [ballerinax/prometheus/0.2.0::metric_reporter.bal:(63:13,63:13)] concurrent calls will not be made to this method since the method is not an 'isolated' method

This seems to be a blocker for performance.

Add Graavlvm check workflow

Description:
A workflow should be added to verify graalvm compatibility for prometheus module.

Suggested Labels:

Suggested Assignees:

Affected Product Version:

OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

406 occurs when datadog fetches from metrics endpoint

Description:
Following occurs when datadog is configured to fetch from the Ballerina metrics endpoint.

2024-06-12 23:20:14 +0530 | CORE | ERROR | (pkg/collector/worker/check_logger.go:71 in Error) | check:openmetrics | Error running check: [{"message": "There was an error scraping endpoint http://localhost:9797/metrics: 406 Client Error: Not Acceptable for url: http://localhost:9797/metrics", "traceback": "Traceback (most recent call last):\n  File \"/opt/datadog-agent/embedded/lib/python3.11/site-packages/datadog_checks/base/checks/base.py\", line 1224, in run\n    self.check(instance)\n  File \"/opt/datadog-agent/embedded/lib/python3.11/site-packages/datadog_checks/base/checks/openmetrics/v2/base.py\", line 78, in check\n    raise_from(type(e)(\"There was an error scraping endpoint {}: {}\".format(endpoint, e)), None)\n  File \"<string>\", line 3, in raise_from\nrequests.exceptions.HTTPError: There was an error scraping endpoint http://localhost:9797/metrics: 406 Client Error: Not Acceptable for url: http://localhost:9797/metrics\n"}]

Use Testerina based testing instead of Java unit testing approach

Description:
Currently coverage numbers are not properly getting captures due to ballerina sources are being testing using Java unit tests. Proper approach is to migrate tests using Testerina and running using it.

Suggested Labels:

Suggested Assignees:

Affected Product Version:

OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

Grafana metrics dashboard in progress request count is negative

Description:
I recently tried out metrics monitoring with prometheus and grafana as mentioned ballerina website. When I import and view the grafana dashboard, In progress request count was always negative and the negative value kept on increasing as I send more requests to the underlying ballerina service.

Screenshot from 2021-12-08 10-14-23

This needs to be fixed soon since this is the most visible metric in the grafana dashboard.

Affected Product Version:
SL Beta 4

Steps to reproduce:
See description

Grafana Dashboard metrics query issue

Description:
Grafana dashboard queries use min_over_time, max_over_time to get the difference of a range vector to produce outputs such as req/min, errors/min. This breaks at the initial phase as the minimum and maximum of the initial query execution is the same.

But this issue resolves as the time flows because in the next 1 minute period there are min max values.

eg :
sum(max_over_time(requests_total_value{instance=~"$instance",protocol=~"$protocol",http_method=~"$http_method",http_url=~"$http_url",service=~"$service",resource=~"$resource",connector_name="http"}[1m])-min_over_time(requests_total_value{instance=~"$instance",protocol=~"$protocol",http_method=~"$http_method",http_url=~"$http_url",service=~"$service",resource=~"$resource",connector_name="http"}[1m]))

Sugeestions

Instead of using min,max of a range vector use the rate function to calculate the
floor( sum(rate(requests_total_value{connector_name="http"}[1m])*60))

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.