alibaba / opentelemetry-go-auto-instrumentation

OpenTelemetry Compile-Time Instrumentation for Golang
Apache License 2.0
138 stars 18 forks source link

Manual instrumentation support #80

Closed minimAluminiumalism closed 1 month ago

minimAluminiumalism commented 2 months ago

Is your feature request related to a problem? Please describe.

Does this project support manual instrumentation?

Describe the solution you'd like

想问一下目前这种自动插桩的方式支持手动埋点吗?比如我们需要在代码里面打印 trace id 方便排查问题,现在好像没看到相关的文档

Describe alternatives you've considered

No response

Additional context

No response

123liuziming commented 2 months ago

Using opentelemetry-go SDK is recommended. I will add a example later.

123liuziming commented 1 month ago

I 've added a example and document about adding traceId or spanId manually in your log. If you want to do the other operation like creating/ending span, you can just use other method in https://github.com/open-telemetry/opentelemetry-go