Thanks Gary.

Based on the code sample it looks like the syntax for a query is "GET /traces/fragments/search?criteria=%s" where the criteria is a url encoded JSON dictionary. I think I can create those url parameters manually if I wanted.

I also discovered last night that the implementation of a Span has a method called "state" which yields a hashmap containing the span's traceId [1]. That suggests my test can construct a span, record the traceId, and later go back to the server and "GET /traces/complete/{id}" [2] with a generic http client. I haven't implemented, but I'll try that first when time permits.

[1] https://github.com/hawkular/hawkular-apm/blob/afcdb73f1c8a45289f620b0d9557c81c5f532364/client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java#L417
[2] https://hawkular.gitbooks.io/hawkular-apm-user-guide/content/restapi/#GET__traces_fragments__id_



On Tue, Mar 7, 2017 at 12:21 AM, Gary Brown <gbrown@redhat.com> wrote:
Hi Neil

The easiest way to do it is use the Java client for the trace service: https://github.com/hawkular/hawkular-apm/blob/master/client/trace-service-rest-client/src/main/java/org/hawkular/apm/trace/service/rest/client/TraceServiceRESTClient.java#L63

Regards
Gary

----- Original Message -----
> I'm in the process of developing a clojure library that wraps the
> opentracing-java client (the abstract interface), and provides concrete
> implementations for Hawkular APM and Zipkin.
>
> I'm considering ways to test the concrete Hawkular implementation in Travis.
> One thought is to configure Travis to launch a hawkular dev server (from the
> docker image) and then execute a series of test cases to collect traces, and
> finally use the REST API to read back what hawkular received.
>
> The problem being, I haven't found the documentation for the query parameters
> you pass to "GET /traces/fragments/search".
>
> https://hawkular.gitbooks.io/hawkular-apm-user-guide/content/restapi/#GET__traces_fragments_search
>
> Any pointers how to do this? How does the hawkular development team run
> integration tests?
>
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>
_______________________________________________
hawkular-dev mailing list
hawkular-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hawkular-dev