feat: add OtlpHttpPath config support for ZincObserve Telemetry (#3271)

Signed-off-by: Toby Yan <me@tobyan.com>
Co-authored-by: cong <zhangcong1992@gmail.com>
This commit is contained in:
Toby
2023-05-23 11:11:58 +08:00
committed by GitHub
parent fa1d6d50a8
commit 278ae3d26a
3 changed files with 8 additions and 0 deletions

View File

@@ -91,6 +91,9 @@ func createExporter(c Config) (sdktrace.SpanExporter, error) {
if len(c.OtlpHeaders) > 0 {
opts = append(opts, otlptracehttp.WithHeaders(c.OtlpHeaders))
}
if len(c.OtlpHttpPath) > 0 {
opts = append(opts, otlptracehttp.WithURLPath(c.OtlpHttpPath))
}
return otlptracehttp.New(
context.Background(),
opts...,