chef / chef/chef-server

Additional authz_time, authz_count, url in the logs

Open
#1,896 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: opscode-erchef Status: Good First Issue Triage: Confirmed Type: Chore
Dominant language
Erlang
Stars
303
Forks
211
Avg merge
1d 8h
Merged PRs (30d)
5

Description

It would be useful while debugging to get the same request times specifically the authz_time and authz_count and the url being used by the http request in the logs for failed requests as the successful requests.

A successful request:

2019-04-16T22:35:20Z erchef@127.0.0.1 method=GET; path=/organizations/support/groups/admins; status=200; req_id=g3IAA2QAEGVyY2hxMjcuMC4wLjECAAAJrQAAAAIAAAAA; org_name=support; couchdb_groups=false; couchdb_organizations=false; couchdb_containers=false; couchdb_acls=false; 503_mode=false; couchdb_associations=false; couchdb_association_requests=false; req_time=21; rdbms_time=10; rdbms_count=3; authz_time=6; authz_count=1; user=pivotal; req_api_version=1;
2019-04-16T22:35:20Z erchef@127.0.0.1 method=PUT; path=/organizations/support/groups/admins; status=200; req_id=g3IAA2QAEGVyY2hlZMjcuMC4wLjECAAAJ1wAAAAIAAAAA; org_name=support; couchdb_groups=false; couchdb_organizations=false; couchdb_containers=false; couchdb_acls=false; 503_mode=false; couchdb_associations=false; couchdb_association_requests=false; req_time=41; rdbms_time=29; rdbms_count=4; authz_time=6; authz_count=1; user=pivotal; req_api_version=1;

Failed request:

2020-01-28T15:42:39Z erchef@127.0.0.1 method=GET; path=/organizations/orgname/nodes/chefnode; status=500; req_id=g3IAA2QAEGVyY2hlZkAxMjcuMC4wLjECAAA54gAAAAIAAAAA; org_name=explms; couchdb_groups=false; couchdb_organizations=false; couchdb_containers=false; couchdb_acls=false; 503_mode=false; couchdb_associations=false; couchdb_association_requests=false; req_time=4008; rdbms_time=1; rdbms_count=3; user=chefuser; req_api_version=1;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by tracing the request logging path that produces the successful and failed log formats shown in the issue, then identify where authz timing and count are recorded. Done means failed-request logs include authz_time, authz_count, and the HTTP request URL consistently with successful requests, with coverage for both outcomes.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang
Domain
backend, observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.