Skip to content

OpenTelemetry Profiles library implementation for Fluent Bit

License

Notifications You must be signed in to change notification settings

fluent/cprofiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CProfiles

The CProfiles provides a simple API to create and manage profiles for monitoring and observability purposes, the internal data structure is based on OpenTelemetry Profiles schema (v1/development):

Build

Clone the repository:

git clone https://github.com/fluent/cprofiles

Get into the project directory and retrieve submodules:

cd cprofiles/
git submodule update --init --recursive --remote

Compile:

cd build/
cmake -DCPROF_DEV=on ../
make

CPROF_DEV flag enables debugging mode, examples and the unit tests

Usage

For now you can try out the unit test that compiles when dev mode is enabled: tests/cprof-test-profile:

--- profile debug
Profile Duration: 0 nanoseconds

Samples:
  Sample #1:
    Locations:
      [Empty String: No Function Name]
      Function: main
    Values:
      CPU time: 644 ns
      Memory usage: 1046 bytes
    Timestamps:
      Timestamp 0: 1730342869000000000 ns

  Sample #2:
    Locations:
      [Empty String: No Function Name]
      Function: foo
    Values:
      CPU time: 73 ns
      Memory usage: 1068 bytes
    Timestamps:
      Timestamp 0: 1730342869000000000 ns

  Sample #3:
    Locations:
      [Empty String: No Function Name]
      Function: bar
    Values:
      CPU time: 175 ns
      Memory usage: 849 bytes
    Timestamps:
      Timestamp 0: 1730342869000000000 ns

String Table:
  0: ''
  1: 'CPU time'
  2: 'ns'
  3: 'Memory usage'
  4: 'bytes'
  5: 'main'
  6: 'foo'
  7: 'bar'

License

This program is under the terms of the Apache License v2.0.

Authors

Fluent Bit Authors

About

OpenTelemetry Profiles library implementation for Fluent Bit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published