Git Product home page Git Product logo

mv-opentelemetry's Introduction

MvOpentelemetry

OpenTelemetry instrumentation, as used in Mindvalley.

Used to publish Opentelemetry events to applicable processors, for example to Honeycomb.

Opentelemetry resources and processor are configured outside of the scope of this module, use Opentelemetry directly.

Example usage

Somewhere in your application startup, for example in Application.start/2:

def start(_type, _args) do
  :ok = MvOpentelemetry.register_application(:my_app)
  :ok = MvOpentelemetry.register_tracer(:ecto, span_prefix: [:my_app, :repo])

  :ok =
    MvOpentelemetry.register_tracer(:ecto,
      span_prefix: [:my_app, :replica_repo],
      tracer_id: :replica
    )

  :ok = MvOpentelemetry.register_tracer(:plug)
  :ok = MvOpentelemetry.register_tracer(:live_view)
  :ok = MvOpentelemetry.register_tracer(:absinthe)
end

Installation

The package can be installed by adding mv_opentelemetry to your list of dependencies in mix.exs. In this example, we'll use opentelemetry_honeycomb as the processor.

def deps do
  [
    {:mv_opentelemetry, git: "[email protected]:mindvalley/mv-opentelemetry.git"},
    {:opentelemetry_honeycomb, "~> 0.5.0-rc.1"}
  ]
end

And then configure your processor:

# config/runtime.ex
use Config

config :opentelemetry,
  processors: [
    otel_batch_processor: %{
      exporter:
        {OpenTelemetry.Honeycomb.Exporter, write_key: "REPLACE_ME", dataset: "REPLACE_ME"}
    }
  ]

Contributing

When you want to open a PR to this repository, ensure that you sign the Certificate of origin:

$ git commit -s -m "Amazing new feature"

FOSSA Status

mv-opentelemetry's People

Contributors

leylmordor avatar maciej-szlosarczyk 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.