Coder Social home page Coder Social logo

cpanato / profile-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from polarsignals/profile-exporter

0.0 1.0 0.0 66 KB

Create metrics from Parca-compatible APIs and send them to a Prometheus remote-write endpoint.

License: Apache License 2.0

Shell 7.73% Go 72.82% Makefile 14.70% Dockerfile 4.75%

profile-exporter's Introduction

Build Container Apache 2 License

profile-exporter

With a given configuration profile-exporter queries a Parca compatible API, transforms the result into metrics and sends the metrics to a Prometheus remote write endpoint.

It produces the follow metrics:

  1. profile_exporter_root_cumulative_value (labels: query, query_name): The total value as it would be the root in a flamegraph.
  2. profile_exporter_cumulative_value (labels: query, query_name, function_name): The value of the function plus all the functions it called.
  3. profile_exporter_flat_value (labels: query, query_name, function_name): The value that only the function used itself.

Configuration

profile-exporter is configured by a single configuration file passed via the --config-file flag (defaults to profile-exporter.yaml). See profile-exporter.yaml as an example.

remote_write:
  # The URL of the endpoint to send samples to.
  url: <string>

  # Timeout for requests to the remote write endpoint.
  [ remote_timeout: <duration | default = 30s> ]

  # All Prometheus HTTP client configuration options,
  # sigv4 and Azure AD authentication options are available.

parca:
  # gRPC endpoint without protocol
  address: <string>
  # bearer token to use for authentication, `bearerTokenFile` is recommended
  bearerToken: <string>
  # file to read bearer token from for authentication
  bearerTokenFile: <string>
  # connect to Parca-compatible API via an insecure connection
  insecure: <bool>
  # ignore verification of TLS certificate used by Parca-compatible API
  insecure_skip_verify: <bool>

queries:
  # Name of query (will be a label in metrics).
- name: <string>
  # Query to run against Parca-compatible API.
  query: <string>
  # Duration to run query for, as in "last 5m".
  duration: <string>
  # Which functions to generate metrics for.
  matchers:
    # Function name contains the substring
  - contains: <string>

Demo

  1. Run Prometheus with the --web.enable-remote-write-receiver flag.
  2. Run Parca.
  3. Run profile-exporter.

Configuration

Flags:

Usage: profile-exporter

Flags:
  -h, --help                Show context-sensitive help.
      --log-level="info"    Log level.
      --config-file="profile-exporter.yaml"
                            Path to the config file.

profile-exporter's People

Contributors

brancz avatar cpanato 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.