{"id":18310947,"url":"https://github.com/jimschubert/haystack-demo","last_synced_at":"2025-10-08T21:29:01.770Z","repository":{"id":139902291,"uuid":"207616325","full_name":"jimschubert/haystack-demo","owner":"jimschubert","description":"An example of using Expedia's Haystack","archived":false,"fork":false,"pushed_at":"2020-01-09T03:08:39.000Z","size":3129,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T05:46:38.960Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/jimschubert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"jimschubert","patreon":"jimschubert"}},"created_at":"2019-09-10T17:01:59.000Z","updated_at":"2020-01-09T03:08:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ad14f29-add6-48e4-b632-e03a63febfde","html_url":"https://github.com/jimschubert/haystack-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimschubert%2Fhaystack-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimschubert%2Fhaystack-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimschubert%2Fhaystack-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimschubert%2Fhaystack-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimschubert","download_url":"https://codeload.github.com/jimschubert/haystack-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036066,"owners_count":21037092,"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":"2024-11-05T16:15:58.683Z","updated_at":"2025-10-08T21:28:56.736Z","avatar_url":"https://github.com/jimschubert.png","language":"Kotlin","funding_links":["https://github.com/sponsors/jimschubert","https://patreon.com/jimschubert"],"categories":[],"sub_categories":[],"readme":"# haystack demo\n\n## Build\n\n```bash\n./gradlew assemble\ndocker build -t hsd .\ndocker run -p 8080:8080 hsd\n```\n\n## Startup\n\nMake sure you run `git submodules init`.\n\nNext, start up the \"official\" haystack demo code:\n\n```bash\ndocker-compose -f haystack-docker/docker-compose.yml \\\n               -f haystack-docker/traces/docker-compose.yml \\\n               -f haystack-docker/trends/docker-compose.yml \\\n               -f haystack-docker/service-graph/docker-compose.yml \\\n               -f haystack-docker/adaptive-alerting/docker-compose.yml \\\n               -f haystack-docker/example/traces/docker-compose.yml up\n```\n\nA simpler (less memory/cpu intensive) example can be started with trends and alerting:\n\n```bash\ndocker-compose -f haystack-docker/docker-compose.yml \\\n               -f haystack-docker/traces/docker-compose.yml \\\n               -f haystack-docker/service-graph/docker-compose.yml \\\n               -f haystack-docker/example/traces/docker-compose.yml\n```\n\nThen, start this app one of two ways…\n\nDocker:\n```bash\ndocker run -p 8888:8080 --net haystack-docker_default -e \"OTHER_SERVICE=http://frontend:9090/hello\" -e \"HAYSTACK_AGENT_HOST=haystack-agent\" -e \"SPRING_PROFILES_ACTIVE=remote\"  hsd\n```\n\nVia IDE after configuring these environment variables:\n```bash\nOTHER_SERVICE=http://localhost:9090/hello\nHAYSTACK_AGENT_HOST=localhost\n```\n\n## Queries\n\n* http://localhost:8888/v1/products\n  - Default: offset=0,limit=20\n* http://localhost:8888/v1/products?offset=0\u0026limit=1\n  - \"Special\" case, queries 2 records at a time, 10 times (serial database calls)\n* http://localhost:8888/v1/other\n  - Makes a request to the `frontend` API from official Haystack Docker demo\n  \nOther queries are available in the [Postman collection](./postman/Haystack%20Demo.postman_collection.json).\n\n## Inspecting\n\nThis project exposes actuator. You can view specifics about environment, metrics, etc.\n\nExample:\nhttp://localhost:8888/actuator/metrics/com.expedia.www.haystack.client.dispatchers.Dispatcher.dispatch\n\nWant to change log levels at runtime? Try the following:\n\n```bash\ncurl -i -X POST -H 'Content-Type: application/json' -d '{\"configuredLevel\": \"TRACE\"}' http://localhost:8888/actuator/loggers/io.opentracing\n```\n\n## Haystack\n\nAfter starting up the Haystack Infrastructure/Demo and this repository demo, load Haystack's UI at http://localhost:8080/. \n\nServices will display in the UI only after requests are made.\n\nServices will display in the service graph if they are connected to at least one other service (you must hit `/v1/other` for this repo's service to display in the graph).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimschubert%2Fhaystack-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimschubert%2Fhaystack-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimschubert%2Fhaystack-demo/lists"}