OTLP数据

简介

service_otlp input插件实现了ServiceInputV1ServiceInputV2接口,可以接受Opentelemetry log/metric/trace protocol的http/gRPC请求,并且转换输出SLSProto或PipelineGroupEvents。目前尚不支持otlp trace转换到SLSProto。

版本

Beta

配置参数

参数类型是否必选说明

Type

String

插件类型, 固定为service_otlp

Protocals

Struct

接收的协议

Protocals.GRPC

Struct

是否启用gRPC Server

Protocals.GRPC.Endpoint

string

gRPC Server 地址。

默认取值为:0.0.0.0:4317

Protocals.GRPC.MaxRecvMsgSizeMiB

int

gRPC Server 最大接受Msg大小。

Protocals.GRPC.MaxConcurrentStreams

int

gRPC Server 最大并发流。

Protocals.GRPC.ReadBufferSize

int

gRPC Server读缓存大小。

Protocals.GRPC.WriteBufferSize

int

gRPC Server写缓存大小。

Protocals.GRPC.Compression

string

gRPC Server压缩算法,可以用gzip。

Protocals.GRPC.Decompression

string

gRPC Server解压算法,可以用gzip。

Protocals.GRPC.TLSConfig

Struct

gRPC Server TLS CONFIG配置。

Protocals.HTTP

Struct

是否启用HTTP Server

Protocals.HTTP.Endpoint

string

HTTP Server 地址。

默认取值为:0.0.0.0:4318

Protocals.HTTP.MaxRecvMsgSizeMiB

int

HTTP Server 最大接受Msg大小。

默认取值为:64(MiB)

Protocals.HTTP.ReadTimeoutSec

int

HTTP 请求读取超时时间。

默认取值为:10s

Protocals.HTTP.ShutdownTimeoutSec

int

HTTP Server关闭超时时间。

默认取值为:5s

样例

  • 只接收gRPC请求。

enable: true
version: v2
inputs:
  - Type: service_otlp
    Protocals:
      GRPC:     
flushers:
  - Type: flusher_stdout
    OnlyStdout: true  
  • 接收http/gRPC请求,使用默认otlp的默认端口。gRPC:4317,HTTP:4318.

enable: true
version: v2
inputs:
  - Type: service_otlp
    Protocals:
      GRPC:        
      HTTP:        
flushers:
  - Type: flusher_stdout
    OnlyStdout: true  
  • 完整配置

enable: true
version: v2
inputs:
  - Type: service_otlp
    Protocals:
      GRPC:        
        Endpoint: 0.0.0.0:4317
        MaxRecvMsgSizeMiB: 64
        MaxConcurrentStreams: 100
        ReadBufferSize: 1024
        WriteBufferSize: 1024
      HTTP:
        Endpoint: 0.0.0.0:4318
        MaxRecvMsgSizeMiB: 64
        ReadTimeoutSec: 10
        ShutdownTimeoutSec: 5
flushers:
  - Type: flusher_stdout
    OnlyStdout: true  

Last updated