Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document external interfaces #456

Closed
jpkrohling opened this issue Oct 6, 2017 · 11 comments
Closed

Document external interfaces #456

jpkrohling opened this issue Oct 6, 2017 · 11 comments
Labels
blocked documentation help wanted Features that maintainers are willing to accept but do not have cycles to implement

Comments

@jpkrohling
Copy link
Contributor

  • agent's HTTP/JSON API polled by the clients
  • agent's UDP/Thrift APIs (we already have IDLs for that)
  • collector's HTTP POST API (Thrift and JSON)

Discussion: https://groups.google.com/d/msg/jaeger-tracing/L27aTD9kXRc/-Y3PTdy-BAAJ

Related to #404 .

@pavolloffay
Copy link
Member

pavolloffay commented Oct 6, 2017

Also related to #158 and #206

@yurishkuro yurishkuro added this to the Release 1.0 milestone Oct 8, 2017
@pavolloffay pavolloffay added help wanted Features that maintainers are willing to accept but do not have cycles to implement outreachy labels Oct 12, 2017
@jpkrohling
Copy link
Contributor Author

Perhaps this would also fit on this task, as suggested on Gitter by @NicolasT

Are there any docs on how Jaeger clients are supposed to encode trace/span-id's etc in e.g. HTTP headers, or should one reverse-engineer one of the existing client libs?

@yurishkuro
Copy link
Member

I hope this would be mostly automated once #773 is done

@PikBot
Copy link
Contributor

PikBot commented May 24, 2018

@yurishkuro would it be better to wait for #773 before I start documenting the items listed by @jpkrohling ?

@yurishkuro
Copy link
Member

Yes, I recommend waiting for #773

@jpkrohling
Copy link
Contributor Author

@yurishkuro, do we have an idea on when #773 would be done? This is blocking the project in achieving the CII Best Practices, as we need to document the input/output of the "external" interfaces.

@facundominguez
Copy link

facundominguez commented Aug 13, 2018

Hello. I'm trying to use the REST API from jaeger-query in regressions tests of a client library for jaeger.

Moreover, I expected using jaeger would give me the ability to automate analysis of the traces. Not having documentation to query the traces poses a difficulty for adoption. Is there a better way to do this?

@black-adder
Copy link
Contributor

For the time being, here's the relevant query endpoints:

GET api/traces/:traceID
GET api/services
GET api/operations?service=:svc

GET api/traces

The relevant params for the api/traces endpoint is below:

query ::= param | param '&' query
param ::= service | operation | limit | start | end | minDuration | maxDuration | tag | tags
service ::= 'service=' strValue
operation ::= 'operation=' strValue
limit ::= 'limit=' intValue
start ::= 'start=' intValue in unix microseconds
end ::= 'end=' intValue in unix microseconds
minDuration ::= 'minDuration=' strValue (units are "ns", "us" (or "µs"), "ms", "s", "m", "h")
maxDuration ::= 'maxDuration=' strValue (units are "ns", "us" (or "µs"), "ms", "s", "m", "h")
tag ::= 'tag=' key | 'tag=' keyvalue
key := strValue
keyValue := strValue ':' strValue
tags :== 'tags=' jsonMap

The return format is JSON (NOTE we don't actually support pagination at the moment but it is exposed in the response):

{
    "data": SEE BELOW,
    "total": INT,
    "limit": INT,
    "offset": INT,
    "errors": [
        {
            "code": INT,
            "msg": STRING,
            "traceID": STRING
        }
    ]
}

where data can be different data types based on the request. The api/traces and api/traces/:traceID endpoints, will return an array of jaeger traces. api/services
and api/operations?service=:svc will return an array of strings.

I'll think of a better location to document this. Swagger might be a bit overkill given the timelines, I could just add this to the documentation page but I'd prefer if the documentation versioning change lands before I go ahead and do that.

@GuangmingLuo
Copy link

@black-adder Hi, as you said those query endpoints are always available from outside, right ? If this is correct, please document that either by Swagger or RAML. A lot of us are waiting for the documentation to make use of the APIs.

@fommil
Copy link

fommil commented Nov 14, 2018

subscribers to this thread may like to know about https://github.com/symbiont-io/jaeger-flamegraph which is a little tool I wrote to consume data from this undocumented endpoint and produce a flamegraph.

It would be super useful to me if the API was adapted to

  1. not have a limit by default (or -1 to disable it)
  2. to download data for all services in a single JSON

@pavolloffay
Copy link
Member

done in the official docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked documentation help wanted Features that maintainers are willing to accept but do not have cycles to implement
Projects
None yet
Development

No branches or pull requests

8 participants