Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion logs/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ func Init(machineId, hostname, version string) {
otlplogshttp.WithEndpoint(endpointUrl.Host),
otlplogshttp.WithURLPath(path),
otlplogshttp.WithHeaders(common.AuthHeaders()),
otlplogshttp.WithTLSClientConfig(&tls.Config{InsecureSkipVerify: *flags.InsecureSkipVerify}),
}
if endpointUrl.Scheme != "https" {
opts = append(opts, otlplogshttp.WithInsecure())
} else {
opts = append(opts, otlplogshttp.WithTLSClientConfig(&tls.Config{InsecureSkipVerify: *flags.InsecureSkipVerify}))
Comment thread
blue4209211 marked this conversation as resolved.
}
client := otlplogshttp.NewClient(opts...)
exporter, _ := otlplogs.NewExporter(context.Background(), otlplogs.WithClient(client))
Expand Down
3 changes: 2 additions & 1 deletion tracing/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ func Init(machineId, hostname, version string) {
otlptracehttp.WithEndpoint(endpointUrl.Host),
otlptracehttp.WithURLPath(path),
otlptracehttp.WithHeaders(common.AuthHeaders()),
otlptracehttp.WithTLSClientConfig(&tls.Config{InsecureSkipVerify: *flags.InsecureSkipVerify}),
}
if endpointUrl.Scheme != "https" {
opts = append(opts, otlptracehttp.WithInsecure())
} else {
opts = append(opts, otlptracehttp.WithTLSClientConfig(&tls.Config{InsecureSkipVerify: *flags.InsecureSkipVerify}))
Comment thread
blue4209211 marked this conversation as resolved.
}
client := otlptracehttp.NewClient(opts...)
exporter, err := otlptrace.New(context.Background(), client)
Expand Down
Loading