opensearch-go icon indicating copy to clipboard operation
opensearch-go copied to clipboard

Support OpenTracing Instrumentation

Open A-Kamaee opened this issue 3 years ago • 6 comments

Hi, We have a problem with opensearch-go client but we can't find it so we want to instrument the client in order to improve the observability. Is there an easy way to achieve that goal? Except forking the project and adding instrumentation to the forked version and using it.

A-Kamaee avatar Feb 15 '22 15:02 A-Kamaee

@A-Kamaee Looks interesting. Please share your proposal on how you would like to add this feature.

VijayanB avatar Feb 15 '22 22:02 VijayanB

I support instrumentation hooks for debugging.

wbeckler avatar Aug 26 '22 05:08 wbeckler

That is indeed interesting, my only note is that OpenTracing project is archived in favor of OpenTelemetry as we can see here: https://www.cncf.io/blog/2022/01/31/cncf-archives-the-opentracing-project/

caioleonhardt avatar Feb 07 '23 21:02 caioleonhardt

I would like to help with this. Would the Otel be built into the GitHub Workflow? Example: .... ` - name: Install OpenTelemetry package run: go get -u go.opentelemetry.io/[email protected]

     - name: Run the instrumented opensearch-go client
       run: |
         go build -o instrumented-client main.go
         ./instrumented-client

`

tannerjones4075 avatar Oct 30 '23 17:10 tannerjones4075

I want to try to add instrumentation (otel) here. However, I am lost on how we can add it to every available API.

How do we keep track of changes to OpenSearch API and add the changes in the SDK? Do we do it manually or have a generator for it like v2 ? @Jakob3xD

Specifically, if I wanted to add the db.operation attribute, how would I do it? https://opentelemetry.io/docs/specs/semconv/attributes-registry/db/

I tried to add an interface here similar to what ES does today https://github.com/urdarinda/opensearch-go/pull/1/files

urdarinda avatar Mar 23 '24 15:03 urdarinda