gliderlabs / gliderlabs/logspout
RAW_FORMAT environment variable not working
- Dominant language
- Go
- Stars
- 4.7k
- Forks
- 661
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to route my logs to Amplitude. The Amplitude API requires a JSON string sent, so I have tried formatting the RAW_FORMAT env variable to the appropriate string. However, when I inspect my logs via the --publish option, there seems to be no change in the format, whichever template I set. This eventually leads the logs not being sent to Amplitude.
This is the command that I run:
```docker
docker run --name="logspout" --env RAW_FORMAT='{ "api_key" : "MY_API_KEY", "events" : [{{ toJSON .Data }}] }' --volume=/var/run/docker.sock:/var/run/docker.sock --publish=127.0.0.1:8000:80 gliderlabs/logspout raw://api.amplitude.com:443/2/httpapi
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with the supplied docker run command, checking how RAW_FORMAT is read and how the --publish path formats logs. Trace the format handling from the environment variable to the Amplitude destination and verify that changing the template changes the published JSON output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100