orb icon indicating copy to clipboard operation
orb copied to clipboard

Draft to add OtelCollector as a service in orb

Open lpegoraro opened this issue 2 years ago • 4 comments

OtelCol Components and How Orb uses them

Sinker OTLP

In the Sinker, where we receive metrics from the orb-agents in the handleMetrics function

sequenceDiagram
    autonumber
    activate Sinker
    loop handleMetrics
        Sinker->>Orb: Fetches Sinks data from Orb
        Sinker->>OTLPReceiver: Passes the OTLP through a custom receiver
        OTLPReceiver->>AttributeProcessor: Add sink data to OTLP package
        AttributeProcessor->>OTLPExporter: Exports OTLP with custom attrs to OtelCol
    end
    deactivate Sinker

OtelCol

Here is how the orb otel-collector should work

sequenceDiagram
    autonumber
    loop handleMetrics
        OTLPReceiver->>GroupByAttributeProcessor: separate from MFOwnerID and AgentID 
        GroupByAttributeProcessor->>RoutingProcessor: route to sinks within OTLP
        RoutingProcessor->>Exporters: export data
    end

To test and check performance, these processors could be activated after Routing

import (
	"go.opentelemetry.io/collector/processor/batchprocessor"
        "go.opentelemetry.io/collector/processor/memorylimiterprocessor"
)
_ = []component.Factories{
    // current version and stability for metrics [ 0.56.0 , beta ]
    batchprocessor.NewFactory(),
    // current version and stability for metrics [ 0.56.0 , beta ]
    memorylimiterprocessor.NewFactory(),
}

lpegoraro avatar Jul 20 '22 21:07 lpegoraro

This pull request introduces 1 alert when merging 5c7b77701dea643ba14f21ac340613f6235d8cbc into 631a8c2ca47530d73e3ee9be74df4838913650b3 - view on LGTM.com

new alerts:

  • 1 for Disabled TLS certificate check

lgtm-com[bot] avatar Jul 20 '22 21:07 lgtm-com[bot]

This pull request introduces 1 alert when merging 990a843dab6a45ed00efb1ec5530e0c62a10b77c into cfbe8e8f0f131d6d21f45032a95cc3be6263b343 - view on LGTM.com

new alerts:

  • 1 for Disabled TLS certificate check

lgtm-com[bot] avatar Jul 21 '22 20:07 lgtm-com[bot]

This pull request introduces 1 alert when merging 1a52c235bd21918ffeddf9777fa95e7d960e4005 into a33d08b2f3ae2f5f47a461d7e0556dd5b904c567 - view on LGTM.com

new alerts:

  • 1 for Disabled TLS certificate check

lgtm-com[bot] avatar Jul 22 '22 20:07 lgtm-com[bot]

This pull request introduces 1 alert when merging 6b30921bd51b3279ec86b0af4046d3c1ba098b8e into b4fec84ed515b29309b322d9fa2b992d531b7a37 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

lgtm-com[bot] avatar Jul 28 '22 17:07 lgtm-com[bot]