Git Product home page Git Product logo

famix-opentelemetry's Introduction

Moose version Moose version Build Info Coverage Status

Famix-OpenTelemetry

Famix metamodel for OpenTelemetry traces.

Installation

Metacello new
  githubUser: 'moosetechnology' project: 'Famix-OpenTelemetry' commitish: 'main' path: 'src';
  baseline: 'FamixOpenTelemetry';
  load

Importing

OpenTelemetry traces can be stored in a variety of telemetry backends, such as Zipkin or any OTelCollector. To support this modularity, the importer works like an ELT pipeline.

  • Extractors retrieve the raw trace data from a source outside the image and deserialize it. Some extractors can output the retrieved data to a file, by configuring them with outputFilename:. The data can then be extracted from the file, for example with OTelJSONFileExtractor.
  • Loaders understand a specific raw data structure and use it to build the model.
  • Transformers are optional, they can process or apply modifications to the trace model.
importer := OpenTelemetryImporter new.
importer
  extractor: (OTelZipkinExtractor new endpoint: 'http://localhost:9411');
  loader: OTelZipkinLoader new;
  transformers: { OTelTagTransformer new
      predicate: [ :tag | "match a tag" ];
      block: [ :value | "compute its new value" ] }.
importer import. "returns a filled FamixOTelModel"

Supported Telemetry Aggregators

Aggregator Baseline
Zipkin default
Elasticsearch elasticsearch

Available Transformers

Transformer Description Baseline
TagTransformer modifies Span tags that match a predicate with a pluggable block default
FamixLinker links Spans to their origin in a Famix model default
FamixValueLinker links origin and generates a FamixValue model from serialized arguments and result value

Examples

Example with ElasticSearch

Metacello new
  githubUser: 'moosetechnology' project: 'Famix-OpenTelemetry' commitish: 'main' path: 'src';
  baseline: 'FamixOpenTelemetry';
  load: 'elasticsearch'.

elasticExtractor := OTelElasticsearchExtractor new.
elasticExtractor
  beHttps;
  endpoint: 'endpointToElastic';
  index: '<your index name>';
  apiKey: '<your api key>';
  size: 30.

importer := OpenTelemetryImporter new.
importer
  extractor: elasticExtractor;
  loader: OTelElasticsearchOtelLoader new.
model := importer import. "returns a filled FamixOTelModel"

model allWithType: FamixOTelTrace.

Modeling Values

It is possible to model serialized runtime values stored in traces using Famix-Value. To enable this feature, load the value group:

Metacello new
  githubUser: 'moosetechnology' project: 'Famix-OpenTelemetry' commitish: 'main' path: 'src';
  baseline: 'FamixOpenTelemetry';
  load: 'value'

A transformer, such as an instance of OTelFamixValueLinker, can be added to the import pipeline to create a FamixValue model.
The values can also be linked to the model of the application that produced them by configuring the given FamixValue importer.
In order to enable navigation between the traces and the values when inspecting entities, they must coexist in the same FamixOTelValueModel.

traceModel := FamixOTelValueModel new.
javaModel := MooseModel root at: 1. "model of the Java application that produced the traces"
importer loader: (OTelZipkinLoader new model: traceModel).
importer transformers: { OTelFamixValueLinker new
    "keys of tags containing the relevant values"
    classKey: 'class';
    methodKey: 'method';
    argsKey: 'arguments';
    resultKey: 'result';
    "configure a FamixValue importer, this one understands JSON from the Jackson Java library"
    importer: (FamixValueJavaJacksonImporter new
        model: traceModel;
        "configure an entity finder, this one is for searching a FamixJava model"
        entityFinder: (FamixJavaEntityFinder new model: javaModel)) }.
importer import. "fills traceModel with FamixOTel and FamixValue entities"

famix-opentelemetry's People

Contributors

alkalinan avatar badetitou avatar fabiovandewaeter avatar gabriel-darbord avatar

Stargazers

 avatar  avatar

Watchers

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