Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telemetry and logging #551

Open
Alirexaa opened this issue Jul 10, 2024 · 4 comments
Open

Telemetry and logging #551

Alirexaa opened this issue Jul 10, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Alirexaa
Copy link
Contributor

Description
Could this Client support OpenTelemetry (including tracing, metrics, and logs)?

The following link helps with how to implement it.
https://opentelemetry.io/docs/languages/net/instrumentation/

@curquiza
Copy link
Member

Hello @Alirexaa
To get data from Meilisearch?
We already provide this feature -> https://github.com/orgs/meilisearch/discussions/625

@Alirexaa
Copy link
Contributor Author

Hello @Alirexaa To get data from Meilisearch? We already provide this feature -> https://github.com/orgs/meilisearch/discussions/625

Is this feature still experimental?
I think its should be support in client.

Also we need tracing too.

@curquiza
Copy link
Member

I think its should be support in client.

What the point of having telemetry on the client side? Or do you mean being able to activated the experimental feature on the client side?

Also we need tracing too.

Are the meilisearch logs not enough? https://www.meilisearch.com/docs/learn/configuration/instance_options#log-level

@Alirexaa
Copy link
Contributor Author

I'll explain to you in more detail.

Metrics:

You point out that meilisearch exposes some metrics but I don't see any API in the client to get these metrics, so I mean active this feature on the client side. Also, add some ability for the client to get these metrics in some regular period (for example get metrics every 5 seconds to show metrics on charts) this ability should be for easy integration of the meilisearch-dotnet client to user applications.

Tracing:

Just like other dotnet applications that use ActivitySource to trace requests, for example, attach tags, record request time, and more.
Some of the dotnet clients use this pattern for tracing. for example elasticsearch-dotnet client support tracing:

Define activity resource:
https://github.com/elastic/elastic-transport-net/blob/eb5416e8df75e4c50215bf5258e13189afd9017d/src/Elastic.Transport/Diagnostics/OpenTelemetry/OpenTelemetry.cs#L13-L72

Set activity:
https://github.com/elastic/elastic-transport-net/blob/eb5416e8df75e4c50215bf5258e13189afd9017d/src/Elastic.Transport/DistributedTransport.cs#L116-L297

The client should support tracing for every request sent to meilisearch.

Logging

logging should support in client side. These logs are not related to meilisearch, it's related to the client side.
and it is better to provide the ILoggerFactory param in the client constructor to have a single logger entire app.

@curquiza curquiza changed the title Support OpenTelemetry Telemetry and logging Jul 24, 2024
@curquiza curquiza added the enhancement New feature or request label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants