influxdata / influxdata/kapacitor

logging API returns logfmt format regardless of header

Open
#2,015 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

when executing GET /kapacitor/v1preview/logs
Content-Type: application/json

I always get logfmt format back...

root@devdatacenter-kapacitor-0:/# curl --header "Content-Type: application/json" localhost:9092/kapacitor/v1preview/logs
ts=2018-08-08T20:48:19.626Z lvl=info msg="created log session" service=sessions id=cd1e7a68-a6d0-4a5f-9a0d-d7842e2ecca0 content-type=application/logfmt
...

2018/08/08 19:57:47 Using configuration at: /etc/kapacitor/kapacitor.conf
ts=2018-08-08T19:57:47.978Z lvl=info msg="kapacitor starting" service=run version=1.5.0 branch=HEAD commit=ee0d8bc17a01a3321d7d44eb5ee8e1156c3d5ec6
ts=2018-08-08T19:57:47.978Z lvl=info msg="go version" service=run version=go1.10.2

Contributor guide

Open the contributing guide

Research direction

Reproduce the GET /kapacitor/v1preview/logs request with the curl command and inspect the handler for that endpoint. Determine how the request header is used to select the response format; done means the API returns the format requested by the client instead of always returning logfmt.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
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.