Debian Codegraph @

internal/shared/otlp/otlpmetric/oconf/optiontypes.go.tmpl

raw
1 // Code generated by gotmpl. DO NOT MODIFY.
2 // source: internal/shared/otlp/otlpmetric/oconf/optiontypes.go.tmpl
3
4 // Copyright The OpenTelemetry Authors
5 // SPDX-License-Identifier: Apache-2.0
6
7 package oconf
8
9 import "time"
10
11 const (
12 // DefaultCollectorGRPCPort is the default gRPC port of the collector.
13 DefaultCollectorGRPCPort uint16 = 4317
14 // DefaultCollectorHTTPPort is the default HTTP port of the collector.
15 DefaultCollectorHTTPPort uint16 = 4318
16 // DefaultCollectorHost is the host address the Exporter will attempt
17 // connect to if no collector address is provided.
18 DefaultCollectorHost string = "localhost"
19 )
20
21 // Compression describes the compression used for payloads sent to the
22 // collector.
23 type Compression int
24
25 const (
26 // NoCompression tells the driver to send payloads without
27 // compression.
28 NoCompression Compression = iota
29 // GzipCompression tells the driver to send payloads after
30 // compressing them with gzip.
31 GzipCompression
32 )
33
34 // RetrySettings defines configuration for retrying batches in case of export failure
35 // using an exponential backoff.
36 type RetrySettings struct {
37 // Enabled indicates whether to not retry sending batches in case of export failure.
38 Enabled bool
39 // InitialInterval the time to wait after the first failure before retrying.
40 InitialInterval time.Duration
41 // MaxInterval is the upper bound on backoff interval. Once this value is reached the delay between
42 // consecutive retries will always be `MaxInterval`.
43 MaxInterval time.Duration
44 // MaxElapsedTime is the maximum amount of time (including retries) spent trying to send a request/batch.
45 // Once this value is reached, the data is discarded.
46 MaxElapsedTime time.Duration
47 }