GithubHelp home page GithubHelp logo

go-ipfs-datadog-plugin's Introduction

go-ipfs-datadog-plugin

This repository contains the following go-ipfs plugins:

  • Datadog logger plugin allows users to set log levels for each go-ipfs subsystem.
  • OpenTelemetry metrics plugin configures an OTLP exporter that sends metrics to an OpenTelemetry collector.

Caveats

  • Plugins only work on Linux and MacOS at the moment. You can track the progress of this issue here: golang/go#19282

  • If you are using go-ipfs 0.4.22 or older, some traces will be lost. See: ipfs/kubo#6672

Building and Installing

You must build the plugin with the exact version of go used to build the go-ipfs binary you will use it with. You can find the go version for go-ipfs builds from dist.ipfs.io in the build-info file, e.g. https://dist.ipfs.io/go-ipfs/v0.4.22/build-info or by running ipfs version --all

You can build this plugin by running make build. You can then install it into your local IPFS repo by running make install.

Plugins need to be built against the correct version of go-ipfs. This package generally tracks the latest go-ipfs release but if you need to build against a different version, please set the IPFS_VERSION environment variable.

You can set IPFS_VERSION to:

  • vX.Y.Z to build against that version of IPFS.
  • $commit or $branch to build against a specific go-ipfs commit or branch.
  • /absolute/path/to/source to build against a specific go-ipfs checkout.

To update the go-ipfs, run:

> make go.mod IPFS_VERSION=version

Manual Installation

Copy datadog-plugin.so to $IPFS_DIR/plugins/datadog-plugin.so (or run make install if you are installing locally)

Configuration

Define plugin configurations variables in the ipfs config file.

  • datadog-logger config:
{
...
"Plugins": {
    "Plugins": {
    ...
      "datadog-logger": {
        "Config": {
            "Levels": {
                "fatal": ["system1", "system2", ...],
                "error": [...]
                "warn": [...]
                ...
            },
            "DefaultLevel": "info"
        },
        "Disabled": false
      },
    ...
    }
  },
...
}
  • otel-metrics

Like Kubo's OpenTelemetry-based tracing, OpenTelemetry metrics are configured via environment variables. A Sample .envrc-sample file is provided. Make a copy named .envrc and follow the instructions to configure the plugin. For other execution environments, these environment variables should be provided via the particular systems environment mechanism (e.g. through a Kubernetes ConfigMap.)

Integration testing

Rudimentary integration testing is provided for the OpenTelemetry-based metrics plugin. To run these tests, a local configuration must be provided via environment variables to connect the OTEL exporter to a working OTEL collector. Run the tests using the following command:

make integration

The integration tests will take about 5 minutes and should result in the following metrics being sent to your collector:

  • go-ipfs-datadog-plugin.integration_test.counter
  • go-ipfs-datadog-plugin.integration_test.histogram

Manually verify the presence of these metrics in your collector.

References

License

MIT

go-ipfs-datadog-plugin's People

Contributors

brianlobert avatar burib avatar dependabot-preview[bot] avatar michaelmure avatar ncocchiaro avatar omahs avatar shazow avatar smoyer64 avatar

Stargazers

 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

go-ipfs-datadog-plugin's Issues

Report metrics to datadog

Same as for the logs and traces, it'd be nice to have another plugin here to report the metrics to datadog.

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

dmitri.shuralyov.com/gpu/[email protected]: unrecognized import path "dmitri.shuralyov.com/gpu/mtl" (https fetch: Get https://dmitri.shuralyov.com/gpu/mtl?go-get=1: EOF)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Open source

  • Change name to go-ipfs-datadog-plugin? #1
  • Add README #2
  • Add MIT license
  • Make public

Add `ipfs` to the name

While it does follow the same naming scheme as github.com/ipfs/go-*-plugin packages, they have the benefit of being under the ipfs namespace whereas this one is not.

If someone is searching for projects, they'll almost definitely search with a query for project names with ipfs, rather than going through every single datadog plugin for go and hope to find one that is built for ipfs. :)

I suggest something like go-ipfs-datadog-plugin

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.