| 13 | ) |
| 14 | |
| 15 | type OTLPHTTPExporter struct { |
| 16 | endpoint string |
| 17 | httpClient *http.Client |
| 18 | retries int |
| 19 | batchSize int |
| 20 | flushEvery time.Duration |
| 21 | |
| 22 | mu sync.Mutex |
| 23 | buffer map[string][]map[string]any |
| 24 | lastFlush time.Time |
| 25 | sentBatches int |
| 26 | sentRecords int |
| 27 | lastError string |
| 28 | lastStatusCode int |
| 29 | } |
| 30 | |
| 31 | func NewOTLPHTTPExporter(endpoint string, timeout time.Duration, retries, batchSize int, flushEvery time.Duration) *OTLPHTTPExporter { |
| 32 | if timeout <= 0 { |
nothing calls this directly
no outgoing calls
no test coverage detected