{"id":25274562,"url":"https://github.com/piszmog/emissary","last_synced_at":"2026-07-22T02:33:15.936Z","repository":{"id":37858566,"uuid":"466624375","full_name":"Piszmog/emissary","owner":"Piszmog","description":" 🤝 Proxy service that can log boundary events","archived":false,"fork":false,"pushed_at":"2023-02-09T05:05:22.000Z","size":272,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-12T06:35:33.673Z","etag":null,"topics":["logging","proxy","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Piszmog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-06T03:18:01.000Z","updated_at":"2023-01-31T19:37:10.000Z","dependencies_parsed_at":"2023-02-19T04:45:27.517Z","dependency_job_id":null,"html_url":"https://github.com/Piszmog/emissary","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Piszmog/emissary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piszmog%2Femissary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piszmog%2Femissary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piszmog%2Femissary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piszmog%2Femissary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Piszmog","download_url":"https://codeload.github.com/Piszmog/emissary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Piszmog%2Femissary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010516,"owners_count":26084757,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["logging","proxy","rust"],"created_at":"2025-02-12T14:31:04.230Z","updated_at":"2025-10-12T06:35:34.167Z","avatar_url":"https://github.com/Piszmog.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emissary\n\nEmissary is a proxy service written in Rust. It can be used to log boundary events of a service, such as the start and\nend of an HTTP request.\n\n## Usage\n\n```shell\n$ ./emissary -c emissary.toml\n```\n\n### Options\n\n| Option                | Default           | Required  | Description                        |\n|-----------------------|:------------------|-----------|------------------------------------|\n| `-c`, `--config-file` | `./emissary.toml` | **True**  | The path to the configuration file |\n| `-h`, `--help`        | N/A               | **False** | Print help information             |\n| `-V`, `--version`     | N/A               | **False** | Print version information          |\n\n## Configuration Schema\n\nBelow is the schema for the configuration file.\n\n### `http`\n\nThe HTTP `address` and `port` to run **Emissary** on.\n\n###### Example\n\n```toml\n[http]\naddress = \"127.0.0.1\"\nport = 8080\n```\n\n### `proxy`\n\nThe HTTP `address` and `port` the main application is on.\n\n###### Example\n\n```toml\n[proxy]\naddress = \"127.0.0.1\"\nport = 8082\n```\n\n### `logging`\n\nConfigures the logging of **Emissary**.\n\n#### `mode`\n\nDetermines the logging mode of **Emissary**. There are two options: `json` and `plain`.\n\n###### Example\n\n```toml\n[logging]\n# Logs are written in JSON format\nmode = \"json\"\n```\n\n```toml\n[logging]\n# Logs are written in plain format\nmode = \"plain\"\n```\n\n#### `json.format`\n\nConfigures the format of the JSON logs.\n\n###### Example\n\n```toml\n[logging.json.format]\nrequest.id = \"%{UUID()}\"\nrequest.method = \"%{METHOD}\"\nrequest.uri = \"%{URI}\"\n```\n\n```json\n{\n  \"request\": {\n    \"id\": \"b5f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8\",\n    \"method\": \"GET\",\n    \"uri\": \"/\"\n  }\n}\n```\n\n#### `plain.format`\n\nConfigures the format of the plain logs.\n\n###### Example\n\n```toml\n[logging.plain.format]\nID = \"%{UUID()}\"\nMethod = \"%{METHOD}\"\nURI = \"%{URI}\"\n```\n\n```text\n2022-06-10T01:50:23.490857Z  INFO ID=\"c9035e94-fc3c-43a3-a4ca-93aecbb7b49d\" Method=\"GET\" Status=\"200\" URI=\"/get\"\n```\n\n## Logging Operations\n\nLogging as a number of builtin operations that can be used.\n\n| Operation             | Description                                                                                        |\n|-----------------------|----------------------------------------------------------------------------------------------------|\n| `UUID()`              | Generates a UUID                                                                                   |\n| `DURATION(NS/MS/S)`   | Returns the duration of the request to the service in either nanoseconds, milliseconds, or seconds |\n| `REQUEST_HEADER(..)`  | Returns the specified request header                                                               |\n| `RESPONSE_HEADER(..)` | Returns the specified response header                                                              |\n| `METHOD`              | Returns the request method                                                                         |\n| `URI`                 | Returns the request URI                                                                            |\n| `STATUS_CODE`         | Returns the response status code                                                                   |\n\n## Example\n\nSee the [emissary.toml](examples/mainapp/emissary.toml) in the `examples` directory.\n\n### JSON\n\n```json\n{\n  \"details\": {\n    \"duration_ms\": \"1\",\n    \"duration_ns\": \"1165694\",\n    \"duration_s\": \"0\"\n  },\n  \"request\": {\n    \"id\": \"8c51cff7-0a8b-48c2-9bc1-2712c3712f79\",\n    \"method\": \"GET\",\n    \"uri\": \"/get\",\n    \"version\": \"1.0.0\"\n  },\n  \"response\": {\n    \"content_type\": \"text/plain; charset=utf-8\",\n    \"status_code\": 200\n  }\n}\n```\n\n### Plain\n\n```text\n2022-06-10T01:50:23.490857Z  INFO ContentType=\"text/plain; charset=utf-8\" Duration(ms)=\"1\" Duration(ns)=\"1314047\" Duration(s)=\"0\" ID=\"c9035e94-fc3c-43a3-a4ca-93aecbb7b49d\" Method=\"GET\" Status=\"200\" URI=\"/get\" Version=\"1.0.0\" \n```\n\n## TODOs\n\n* Database Logging\n* Message Queue Logging\n* Add support for custom extensions\n* Log output","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiszmog%2Femissary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiszmog%2Femissary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiszmog%2Femissary/lists"}