Skip to content

Commit

Permalink
Merge branch 'main' into profiles-marshaler
Browse files Browse the repository at this point in the history
  • Loading branch information
julianocosta89 authored Sep 26, 2024
2 parents 0974204 + c155b14 commit 5dcc273
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
28 changes: 15 additions & 13 deletions exporter/otlphttpexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/configcompression"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/config/configopaque"
"go.opentelemetry.io/collector/config/configretry"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/exporter"
Expand All @@ -33,19 +32,22 @@ func NewFactory() exporter.Factory {
}

func createDefaultConfig() component.Config {
clientConfig := confighttp.NewDefaultClientConfig()
clientConfig.Timeout = 30 * time.Second
// Default to gzip compression
clientConfig.Compression = configcompression.TypeGzip
// We almost read 0 bytes, so no need to tune ReadBufferSize.
clientConfig.WriteBufferSize = 512 * 1024
clientConfig.MaxIdleConns = nil
clientConfig.MaxIdleConnsPerHost = nil
clientConfig.MaxConnsPerHost = nil
clientConfig.IdleConnTimeout = nil

return &Config{
RetryConfig: configretry.NewDefaultBackOffConfig(),
QueueConfig: exporterhelper.NewDefaultQueueConfig(),
Encoding: EncodingProto,
ClientConfig: confighttp.ClientConfig{
Endpoint: "",
Timeout: 30 * time.Second,
Headers: map[string]configopaque.String{},
// Default to gzip compression
Compression: configcompression.TypeGzip,
// We almost read 0 bytes, so no need to tune ReadBufferSize.
WriteBufferSize: 512 * 1024,
},
RetryConfig: configretry.NewDefaultBackOffConfig(),
QueueConfig: exporterhelper.NewDefaultQueueConfig(),
Encoding: EncodingProto,
ClientConfig: clientConfig,
}
}

Expand Down
2 changes: 1 addition & 1 deletion pdata/ptrace/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (dest Span) unmarshalJsoniter(iter *jsoniter.Iterator) {
iter.ReportError("readSpan.parentSpanId", fmt.Sprintf("parse parent_span_id:%v", err))
}
case "flags":
dest.orig.Flags = iter.ReadUint32()
dest.orig.Flags = json.ReadUint32(iter)
case "name":
dest.orig.Name = iter.ReadString()
case "kind":
Expand Down

0 comments on commit 5dcc273

Please sign in to comment.