routereceiver

package module
v1.49.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

README

Route Receiver

This receiver is used to receive telemetry routed from other pipelines.

Supported pipelines

  • Logs
  • Metrics
  • Traces

How It Works

  1. The user configures this receiver in a pipeline.
  2. The user configures a supported component to route telemetry to this receiver.

Configuration

The route receiver does not have any configuration parameters. It simply receives telemetry from other components.

Example Config

The following config is an example configuration of the route receiver. In this example, logs are collected from a file and sent to a log count processor. After each minute, the log counts are converted to metrics and sent to the route receiver in the metrics pipeline.

receivers:
    filelog:
        include: [./example/apache.log]
    route/log-based-metrics:
processors:
    batch:
    logcount:
        route: log-based-metrics
exporters:
    googlecloud:
    logging:

service:
    pipelines:
        logs:
            receivers: [filelog]
            processors: [batch, logcount]
            exporters: [logging]
        metrics:
            receivers: [route/log-based-metrics]
            processors: [batch]
            exporters: [googlecloud]

Documentation

Overview

Package routereceiver provides a receiver that receives telemetry from other components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

NewFactory creates a new factory for the receiver.

func RouteLogs

func RouteLogs(ctx context.Context, name string, ld plog.Logs) error

RouteLogs routes logs to a registered route.

func RouteMetrics

func RouteMetrics(ctx context.Context, name string, md pmetric.Metrics) error

RouteMetrics routes metrics to a registered route.

func RouteTraces

func RouteTraces(ctx context.Context, name string, td ptrace.Traces) error

RouteTraces routes traces to a registered route.

Types

type Config

type Config struct {
}

Config is the config of the route receiver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL