{"id":25328654,"url":"https://github.com/kit/stories","last_synced_at":"2025-10-24T00:23:20.239Z","repository":{"id":75187416,"uuid":"153774013","full_name":"Kit/stories","owner":"Kit","description":"StoryTeller Agent","archived":false,"fork":false,"pushed_at":"2019-06-25T23:17:49.000Z","size":20,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-12T14:59:38.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-19T11:40:52.000Z","updated_at":"2019-03-04T13:24:00.000Z","dependencies_parsed_at":"2023-06-26T02:15:44.235Z","dependency_job_id":null,"html_url":"https://github.com/Kit/stories","commit_stats":null,"previous_names":["kit/stories"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kit%2Fstories","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kit%2Fstories/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kit%2Fstories/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kit%2Fstories/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kit","download_url":"https://codeload.github.com/Kit/stories/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773733,"owners_count":20993634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-14T02:56:31.352Z","updated_at":"2025-10-24T00:23:17.527Z","avatar_url":"https://github.com/Kit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stories\n\nStories is a lightweight agent for StoryTeller logs.\n\n## Configuration\n\nCurrently, the agent has a hardcoded dependency to Scalyr as a provider. This means that the agent will look for the `SCALYR_WRITE_TOKEN` Environment variable to be set. Other than that, `stories` can be configured with the following flags at startup.\n\n*`--buffer=int`*\n\n_default: 1000_\nThe buffer size is how many stories that the agent can store before it sends it in a batch to the provider.\n\n*`--interval=int`*\n\n_default: 1_\n\nThe interval, in seconds, before the agent batch the stories that it has buffered.\n\n\n*`--socket=string`*\n\n_default: /tmp/stories.sock_\n\nThe path where the unix socket will be created. This is used by libraries to send over events.\n\n\n*`--debug=boolean`*\n\n_default: false_\n\nIf you want to see debug logs, you need to set this to `true`. This should not be switched on in production.\n\n#### Batching against an interval\n\nThe way the agent works is that there is a runloop set to the `interval` set at runtime that will send in batch any stories that were collected during the interval.\n\nIf, during the interval, the buffer reach its limit, the agent will trigger a batch send to the provider. If all default settings are set and you send twice the size of the buffer over the interval period, 2 batch will be sent to the provider.\n\n\n## Data Structure of a payload\nA structured log sent to this agent expects a certain structure.\n\n```\n{\n  \"timestamp\": \"542632806622183000\",\n  \"severity\": 3,\n  \"message\": \"A test message\",\n  \"data\": {\n    \"uuid\": \"be739c8e-191c-40fd-af94-b6922e38b184\",\n    \"event\":\"Global\",\n    \"identifier\":\"nil\"\n  }\n}\n```\n\n`timestamp` is the unix timestamp, in nanoseconds.\n\n`severity` is the log level for this message. It defaults to 3 (optional).\n\n`message` is the message you want to appear for this log.\n\n`data` is where all the user info is displayed. You can add as much data as you want.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkit%2Fstories","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkit%2Fstories","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkit%2Fstories/lists"}