GithubHelp home page GithubHelp logo

opamp-spec's Introduction

Odigos OpAMP Fork

This opamp protos fork is used to experiment with the OpAMP protocol for the odigos project.

Odigos OpAMP

Odigos implements OpAMP works like this: The opamp client is implemented in the various Odigos SDKs, and connect to an opamp server on the odiglet which is a daemonset.

The reasons are:

  • The cluster can set up various network policies that might block communication between different nodes.
  • Odigos uses devices to inject the instrumentation into the pods, and the mapping of k8s allocated device id is available from the kubelet on the node itself

Due to this architecture, odigos implementation enjoys the following benefits:

  • Odigos implements both the client and server, and only guarantees compatibility between the two:
    • There is no need to support arbitrary OpAMP implementations which simplifies the code.
    • We can come up with custom conventions that are honored in the Odigos ecosystem but are not speced in the OpAMP protocol.
  • As OpAMP server is a daemonset, there is only one instance which only controls the processes on the node which is roughly the number of instrumented pods:
    • Since the number of pods is at most a few dozen, we can store the state of all the connections in memory.
    • We know that each client will connect to exactly one server, so no need to synchronize the state between multiple server instances.
    • low number of clients means we do not need to worry too much about the performance of the server, as it will not handle an unbounded number of connections.
  • Since all the communication is to local host, there is no need for encryption, authentication, and compression.

Server Implementation

The server currently implements the following features:

  • It accepts connections from clients over http only (no websockets).
  • The server assumes that the client sends the "DeviceId" allocated by kubelet when the instrumentation device is created. It expects the id over the X-Odigos-DeviceId http header, for example: 8497ec75-8928-4e80-90e0-4f29642a0fea.
  • The server maintains a list of all the connected clients and their device ids, and periodically monitors the last heartbeat time to detect disconnected clients.
  • When a client sends it's description, the server persists it into the instrumentationinstance CRD to record that the agent is up and it's description.
  • On the first message from the client, the server responds with resource attributes which should be merged into the agent resource to report useful information about the instrumented service.

buf.build

To generate clients for the various Odigos SDKs in multiple languages, this fork uses the buf build system. To generate the clients, run the following command:

make generate

The client code will be generated inside the gen directory.

Temporarily workflow: copy the files directly into the odigos project according to your language. This should be automated in the future.

opamp-spec's People

Contributors

tigrannajaryan avatar chalin avatar pmm-sumo avatar andykellr avatar tamirdavid1 avatar jpeach avatar codeboten avatar blumamir avatar bogdandrutu avatar djaglowski avatar dsvanlani avatar jskiba avatar mwear avatar peterf778 avatar

Forkers

tamirdavid1

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.