Documentation ¶
Overview ¶
Package chronicleexporter exports OpenTelemetry data to Chronicle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
NewFactory creates a new Chronicle exporter factory.
Types ¶
type Config ¶
type Config struct { exporterhelper.TimeoutConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueConfig `mapstructure:"sending_queue"` configretry.BackOffConfig `mapstructure:"retry_on_failure"` // Endpoint is the URL where Chronicle data will be sent. Endpoint string `mapstructure:"endpoint"` // CredsFilePath is the file path to the Google credentials JSON file. CredsFilePath string `mapstructure:"creds_file_path"` // Creds are the Google credentials JSON file. Creds string `mapstructure:"creds"` // LogType is the type of log that will be sent to Chronicle. LogType string `mapstructure:"log_type"` // OverrideLogType is a flag that determines whether or not to override the `log_type` in the config with `attributes["log_type"]`. OverrideLogType bool `mapstructure:"override_log_type"` // RawLogField is the field name that will be used to send raw logs to Chronicle. RawLogField string `mapstructure:"raw_log_field"` // CustomerID is the customer ID that will be used to send logs to Chronicle. CustomerID string `mapstructure:"customer_id"` // Namespace is the namespace that will be used to send logs to Chronicle. Namespace string `mapstructure:"namespace"` // Compression is the compression type that will be used to send logs to Chronicle. Compression string `mapstructure:"compression"` // IngestionLabels are the labels that will be attached to logs when sent to Chronicle. IngestionLabels map[string]string `mapstructure:"ingestion_labels"` // CollectAgentMetrics is a flag that determines whether or not to collect agent metrics. CollectAgentMetrics bool `mapstructure:"collect_agent_metrics"` // Protocol is the protocol that will be used to send logs to Chronicle. // Either https or grpc. Protocol string `mapstructure:"protocol"` // Location is the location that will be used when the protocol is https. Location string `mapstructure:"location"` // Project is the project that will be used when the protocol is https. Project string `mapstructure:"project"` // Forwarder is the forwarder that will be used when the protocol is https. Forwarder string `mapstructure:"forwarder"` }
Config defines configuration for the Chronicle exporter.
type MockMarshaler ¶
MockMarshaler is an autogenerated mock type for the logMarshaler type
func NewMockMarshaler ¶
func NewMockMarshaler(t interface { mock.TestingT Cleanup(func()) }) *MockMarshaler
NewMockMarshaler creates a new instance of MockMarshaler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockMarshaler) MarshalRawLogs ¶
func (_m *MockMarshaler) MarshalRawLogs(ctx context.Context, ld plog.Logs) ([]*api.BatchCreateLogsRequest, error)
MarshalRawLogs provides a mock function with given fields: ctx, ld
func (*MockMarshaler) MarshalRawLogsForHTTP ¶ added in v1.60.0
func (_m *MockMarshaler) MarshalRawLogsForHTTP(ctx context.Context, ld plog.Logs) (map[string]*api.ImportLogsRequest, error)
MarshalRawLogsForHTTP provides a mock function with given fields: ctx, ld
Source Files ¶
Click to show internal directories.
Click to hide internal directories.