see .ruby-version
with postgres running:
bundle exec rails db:create
bundle exec rails db:create
bundle exec rspec
bundle exec rails s
or with docker:
docker-compose up
all previous comands can be run inside the server container with docker-compose exec app bash
POST /traces
expects the following json structure:
{
"service": "test_service",
"service_version": "0.0.1",
"request": { "any": "json object" },
"response": { "any": "json object" },
"request_ts": 123456789.5,
"response_ts": 123456791.5
}
Where request_ts
and response_ts
are Unix timestamps in seconds (microsecond accuracy is possible)
GET /traces?[newer_than=<timestamp: iso8601-string>][&limit=<max:int,default=1000>][&service=<service.name:string>[&service_version=<version: string>]]
if none of the query params are given, it returns all traces
newer_than
selects the traces that are newer than the given timestamp.
The request_ts
from a previous GET /traces
can be used here for pagination.
limit
limits the amount of traces returned to the given integer. Can be used together with newer_than
for pagination.
service
filters the traces by a specific service.
service_version
filters the traces by a specifc service-version. Can only be supplied if service
is also supplied.
GET /services
returns all services known to traceo
GET /service_versions
returns all service versions known to traceo