alibabacloudlogserviceexporter

package module
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 27 Imported by: 5

README

AlibabaCloud LogService Exporter

This exporter supports sending OpenTelemetry data to LogService

Configuration options:

  • endpoint (required): LogService's Endpoint.
  • project (required): LogService's Project Name.
  • logstore (required): LogService's Logstore Name.
  • access_key_id (optional): AlibabaCloud access key id.
  • access_key_secret (optional): AlibabaCloud access key secret.
  • ecs_ram_role (optional): set AlibabaCLoud ECS ram role if you are using ACK.

Example:

exporters:
  alibabacloud_logservice:
    endpoint: "cn-hangzhou.log.aliyuncs.com"
    project: "demo-project"
    logstore: "demo-logstore"
    access_key_id: "access-key-id"
    access_key_secret: "access-key-secret"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory added in v0.9.0

func NewFactory() component.ExporterFactory

NewFactory creates a factory for AlibabaCloud LogService exporter.

Types

type Config

type Config struct {
	configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
	// LogService's Endpoint, https://www.alibabacloud.com/help/doc-detail/29008.htm
	// for AlibabaCloud Kubernetes(or ECS), set {region-id}-intranet.log.aliyuncs.com, eg cn-hangzhou-intranet.log.aliyuncs.com;
	//  others set {region-id}.log.aliyuncs.com, eg cn-hangzhou.log.aliyuncs.com
	Endpoint string `mapstructure:"endpoint"`
	// LogService's Project Name
	Project string `mapstructure:"project"`
	// LogService's Logstore Name
	Logstore string `mapstructure:"logstore"`
	// AlibabaCloud access key id
	AccessKeyID string `mapstructure:"access_key_id"`
	// AlibabaCloud access key secret
	AccessKeySecret string `mapstructure:"access_key_secret"`
	// Set AlibabaCLoud ECS ram role if you are using ACK
	ECSRamRole string `mapstructure:"ecs_ram_role"`
}

Config defines configuration for AlibabaCloud Log Service exporter.

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

type KeyValues

type KeyValues struct {
	// contains filtered or unexported fields
}

func (*KeyValues) Append

func (kv *KeyValues) Append(key, value string)

func (*KeyValues) AppendMap

func (kv *KeyValues) AppendMap(mapVal map[string]string)

func (*KeyValues) Clone

func (kv *KeyValues) Clone() KeyValues

func (*KeyValues) Len

func (kv *KeyValues) Len() int

func (*KeyValues) Less

func (kv *KeyValues) Less(i, j int) bool

func (*KeyValues) Replace

func (kv *KeyValues) Replace(key, value string)

func (*KeyValues) Sort

func (kv *KeyValues) Sort()

func (*KeyValues) String

func (kv *KeyValues) String() string

func (*KeyValues) Swap

func (kv *KeyValues) Swap(i, j int)

type LogServiceClient

type LogServiceClient interface {
	// SendLogs send message to LogService
	SendLogs(logs []*sls.Log) error
}

LogServiceClient log Service's client wrapper

func NewLogServiceClient

func NewLogServiceClient(config *Config, logger *zap.Logger) (LogServiceClient, error)

NewLogServiceClient Create Log Service client

Jump to

Keyboard shortcuts

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