open-telemetry / opentelemetry-dotnet-contrib

This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
https://opentelemetry.io
Apache License 2.0
421 stars 251 forks source link

Add support OpenSearch #1843

Open rstm-sf opened 1 month ago

rstm-sf commented 1 month ago

Component

OpenTelemetry.Instrumentation.ElasticsearchClient

Is your feature request related to a problem?

Add supports https://www.nuget.org/packages/OpenSearch.Client, similarity https://www.nuget.org/packages/Elasticsearch.Net | https://www.nuget.org/packages/NEST

What is the expected behavior?

diff: https://github.com/rstm-sf/opentelemetry-dotnet-contrib/commit/473d068cedbfbd41ef3f5244f0c211ccdd7a2da3

image image

Which alternative solutions or features have you considered?

Similarity OpenTelemetry.Instrumentation.ElasticsearchClient

Additional context

No response

Kielek commented 1 month ago

@rstm-sf, please consider contribution to OpenSearch and putting there native support of OpenTelemetry (for traces by ActivitySource). It was already do by the new Elastic.Clients.Elasticsearch and then ported to Elastic.Transport.

It will be the best option if you want to invest time to create such functionality.

Otherwise, I think you need to create a dedicated package for this. I do not think that bringing OpenSearch.Client dependency to OpenTelemetry.Instrumentation.ElasticSearchClient package is good idea. Here is a description how to contribute a new pacakge.

Once again, native support is the recommended way how to do it. Then on TracerBuilder you can call something like TracerBuilder.AddSource("OpenSearch.Client");

martinjt commented 3 weeks ago

There's noone available to work on this, however, you're welcome to contribute if you're willing to be a maintainer for it. Do let us know!