# pixie-io/pixie-plugin architecture

> Architecture diagram of the GitHub repository pixie-io/pixie-plugin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pixie-io/pixie-plugin
- Repository: https://github.com/pixie-io/pixie-plugin

## Overview

##### Main Components

a. Core Components:
- Pixie Plugin System (Central Hub)
- Plugin Registry (Repository Structure)
- Individual Plugins
- New Relic Plugin
- OpenTelemetry Plugin

b. Integration Components:
- Pixie Core Platform
- External Data Stores
- OpenTelemetry Collectors
- Plugin Configuration System

##### Specific Elements

- Blue: Core Pixie components
- Green: Plugin configuration files
- Orange: External services/integrations
- Purple: Data flow paths

b. Component Representations:
- Use rectangles for plugins
- Use hexagons for integration points

##### Key Relationships

- Plugin Registration Flow:
→ Plugin.yaml validation
→ Feature enablement
→ Configuration processing

- Data Retention Flow:
→ Pixie data source
→ OpenTelemetry formatting
→ External endpoint delivery

##### Important Details to Capture

- Configuration Parameters:
- How plugin.yaml defines metadata
- Retention.yaml's role in data export

- Security Considerations:
- TLS connections
- Custom export URLs
- API key management

##### Implementation Notes

- Plugin extensibility
- OpenTelemetry standardization
- Configuration flexibility
- Security boundaries

##### Configuration Management

Remember to:
- Document all integration points

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Plugin Registry"
        PR[Plugin Registry]
        PR --> NRP[New Relic Plugin]
        PR --> OTP[OpenTelemetry Plugin]
        
        NRP --> NRPC[plugin.yaml]
        NRP --> NRRC[retention.yaml]
        
        OTP --> OTPC[plugin.yaml]
        OTP --> OTRC[retention.yaml]
    end
    
    subgraph "Plugin System Interface"
        PSI[Plugin System]
        CV[Configuration Validator]
        FM[Feature Manager]
        
        PSI --> CV
        PSI --> FM
    end
    
    subgraph "External Integration Layer"
        EIL[Integration Hub]
        OTC[OpenTelemetry Collector]
        EDS[(External Data Stores)]
        PCP[Pixie Core Platform]
    end
    
    PR --> PSI
    PSI --> EIL
    EIL --> OTC
    EIL --> EDS
    EIL --> PCP
    
    classDef registry fill:#f9f,stroke:#333
    classDef plugin fill:#bbf,stroke:#333
    classDef config fill:#bfb,stroke:#333
    classDef interface fill:#fbb,stroke:#333
    classDef external fill:#ffb,stroke:#333
    
    class PR registry
    class NRP,OTP plugin
    class NRPC,NRRC,OTPC,OTRC config
    class PSI,CV,FM interface
    class EIL,OTC,EDS,PCP external
    
    click PR "https://github.com/pixie-io/pixie-plugin/tree/main/plugins"
    click NRP "https://github.com/pixie-io/pixie-plugin/tree/main/plugins/new-relic"
    click OTP "https://github.com/pixie-io/pixie-plugin/tree/main/plugins/opentelemetry"
    click NRPC "https://github.com/pixie-io/pixie-plugin/blob/main/plugins/new-relic/plugin.yaml"
    click NRRC "https://github.com/pixie-io/pixie-plugin/blob/main/plugins/new-relic/retention.yaml"
    click OTPC "https://github.com/pixie-io/pixie-plugin/blob/main/plugins/opentelemetry/plugin.yaml"
    click OTRC "https://github.com/pixie-io/pixie-plugin/blob/main/plugins/opentelemetry/retention.yaml"
```
