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

Uses latest zipkin library in support of simplified json format #43

Merged
merged 1 commit into from Aug 14, 2017
Merged

Uses latest zipkin library in support of simplified json format #43

merged 1 commit into from Aug 14, 2017

Conversation

codefromthecrypt
Copy link
Member

This uses internal classes to perform a lot of the translation formerly
done here. By updating to latest zipkin, this also allows use of the new
POST /api/v2/spans endpoint from openzipkin/zipkin#1499

I'm happy to support this including work to switch over to the public
zipkin2 types once they become available later this year. In the mean
time, this uses shade to ensure internal types aren't leaked.

This uses internal classes to perform a lot of the translation formerly
done here. By updating to latest zipkin, this also allows use of the new
POST /api/v2/spans endpoint from openzipkin/zipkin#1499

I'm happy to support this including work to switch over to the public
zipkin2 types once they become available later this year. In the mean
time, this uses shade to ensure internal types aren't leaked.
@mtwo
Copy link
Contributor

mtwo commented Aug 13, 2017

Thanks Adrian!
@bogdandrutu FYI

@codefromthecrypt
Copy link
Member Author

codefromthecrypt commented Aug 14, 2017

I tested by running the thing like so..

$ GOOGLE_APPLICATION_CREDENTIALS=~/Downloads/zipkin-demo-81ff9558b5aa.json PROJECT_ID=zipkin-demo java -jar ./collector/target/collector*.jar

then I posted data to the new zipkin endpoint:

# make epoch seconds epoch microseconds, because.. microservices!
$ date +%s123456
1502677917123456
$ curl -s localhost:9411/api/v2/spans -H'Content-Type: application/json' -d'[{
  "traceId": "86154a4ba6e91387",
  "id": "86154a4ba6e91387",
  "kind": "SERVER",
  "name": "get",
  "timestamp": 1502677917123456,
  "duration": 207000,
  "localEndpoint": {
    "serviceName": "testservice",
    "ipv4": "113.210.108.10"
  },
  "tags": {
    "http.path": "/api/blah"
  }
}]'

Then, after a few minutes it arrived here: https://console.cloud.google.com/traces/traces?project=zipkin-demo

@codefromthecrypt
Copy link
Member Author

ps here's an openapi spec that does what I did in curl openzipkin/zipkin-api#33

@bogdandrutu bogdandrutu merged commit f19adc2 into openzipkin:master Aug 14, 2017
@codefromthecrypt codefromthecrypt deleted the latest-zipkin branch August 14, 2017 13:29
@codefromthecrypt
Copy link
Member Author

mind doing a release of v0.3 so that folks can use this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants