@@ -16,7 +16,6 @@ import (
16
16
17
17
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
18
18
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
19
- "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"
20
19
21
20
"github.com/cschleiden/go-workflows/worker"
22
21
@@ -33,19 +32,24 @@ func main() {
33
32
attribute .String ("environment" , "sample" ),
34
33
)
35
34
36
- stdoutexp , err := stdouttrace .New (stdouttrace .WithPrettyPrint ())
37
- if err != nil {
38
- panic (err )
39
- }
35
+ // stdoutexp, err := stdouttrace.New(stdouttrace.WithPrettyPrint())
36
+ // if err != nil {
37
+ // panic(err)
38
+ // }
40
39
41
- oclient := otlptracehttp .NewClient (otlptracehttp .WithEndpoint ("localhost:8360" ), otlptracehttp .WithURLPath ("/traces/otlp/v0.9" ), otlptracehttp .WithInsecure ())
40
+ oclient := otlptracehttp .NewClient (
41
+ // otlptracehttp.WithEndpoint("localhost:8360"),
42
+ // otlptracehttp.WithURLPath("/traces/otlp/v0.9"),
43
+ otlptracehttp .WithEndpoint ("localhost:4318" ),
44
+ otlptracehttp .WithInsecure (),
45
+ )
42
46
exp , err := otlptrace .New (ctx , oclient )
43
47
if err != nil {
44
48
panic (err )
45
49
}
46
50
47
51
tp := trace .NewTracerProvider (
48
- trace .WithSyncer (stdoutexp ),
52
+ // trace.WithSyncer(stdoutexp),
49
53
trace .WithBatcher (exp ),
50
54
trace .WithResource (r ),
51
55
)
0 commit comments