github / github/elastomer-client

Logging

Open
#5 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
197
Forks
28
PR merge metrics
No merged PRs in 30d

Description

We need to add some logging to the `Client` class. For each request the client makes, we should output a detailed debug message to a logger of some sort. I really like how Tire does it; logging a curl command that you can copy/paste and use directly. Also, outputting the status code of the response would be good, too ...

```
[200] curl -XGET 'http://localhost:9200/index/_search' -d '...'
```

Not sure how to handle large bodies and what not. And I don't think we need to log responses.

cc @github/search

Contributor guide

Open the contributing guide

Research direction

Start by locating the Client class and tracing how it makes requests and receives responses. Review the project's existing logger conventions, then determine how to represent the request as a copyable curl command, handle large bodies, and include the response status without logging responses. Done means each request produces the agreed debug output with suitable tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, ruby
Domain
api, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.