All Projects → openzipkin → zipkin-php-example

openzipkin / zipkin-php-example

Licence: Apache-2.0 license
See how much time php services spend on an http request

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to zipkin-php-example

Zipkin
Zipkin is a distributed tracing system
Stars: ✭ 14,969 (+28686.54%)
Mutual labels:  zipkin, distributed-tracing, openzipkin
Brave
Java distributed tracing implementation compatible with Zipkin backend services.
Stars: ✭ 2,117 (+3971.15%)
Mutual labels:  zipkin, distributed-tracing, openzipkin
Spring Cloud Sleuth
Distributed tracing for spring cloud
Stars: ✭ 1,531 (+2844.23%)
Mutual labels:  zipkin, distributed-tracing
Loki
Loki: Simple, Distributed Tracing
Stars: ✭ 127 (+144.23%)
Mutual labels:  zipkin, distributed-tracing
Brave Example
A collection of examples how to use brave instrumentation in various frameworks and libraries.
Stars: ✭ 163 (+213.46%)
Mutual labels:  zipkin, distributed-tracing
Zipkin Armeria Example
Example project that shows how to use armeria and zipkin together
Stars: ✭ 17 (-67.31%)
Mutual labels:  zipkin, distributed-tracing
Sttp
The Scala HTTP client you always wanted!
Stars: ✭ 1,078 (+1973.08%)
Mutual labels:  zipkin, distributed-tracing
Aiozipkin
Distributed tracing instrumentation for asyncio with zipkin
Stars: ✭ 161 (+209.62%)
Mutual labels:  zipkin, distributed-tracing
Zipkin Js
Zipkin instrumentation for Node.js and browsers
Stars: ✭ 489 (+840.38%)
Mutual labels:  zipkin, distributed-tracing
Jaeger Php
Jaeger Bindings for PHP OpenTracing API
Stars: ✭ 185 (+255.77%)
Mutual labels:  zipkin, distributed-tracing
Zipkin Php
Zipkin instrumentation for PHP
Stars: ✭ 190 (+265.38%)
Mutual labels:  zipkin, distributed-tracing
Grpc By Example Java
A collection of useful/essential gRPC Java Examples
Stars: ✭ 709 (+1263.46%)
Mutual labels:  zipkin, distributed-tracing
Opencensus Java
A stats collection and distributed tracing framework
Stars: ✭ 640 (+1130.77%)
Mutual labels:  zipkin, distributed-tracing
Brave Opentracing
Bridge between OpenTracing and Brave
Stars: ✭ 64 (+23.08%)
Mutual labels:  zipkin, distributed-tracing
Docker Zipkin
Docker images for OpenZipkin
Stars: ✭ 639 (+1128.85%)
Mutual labels:  zipkin, distributed-tracing
Opencensus Go
A stats collection and distributed tracing framework
Stars: ✭ 1,895 (+3544.23%)
Mutual labels:  zipkin, distributed-tracing
Zipkin Go
Zipkin tracer library for go
Stars: ✭ 435 (+736.54%)
Mutual labels:  zipkin, distributed-tracing
Zipkin Go Opentracing
OpenTracing Bridge for Zipkin Go
Stars: ✭ 472 (+807.69%)
Mutual labels:  zipkin, distributed-tracing
opentracing-istio-troubleshooting
Tackle the challenge of observability in a Kubernetes application that consists of multiple microservices running in the Open Liberty application server.
Stars: ✭ 16 (-69.23%)
Mutual labels:  zipkin, distributed-tracing
Opencensus Node
A stats collection and distributed tracing framework
Stars: ✭ 249 (+378.85%)
Mutual labels:  zipkin, distributed-tracing

Zipkin PHP example

CircleCI

This is an example app where two php services collaborate on an http request. Notably, timing of these requests are recorded into Zipkin, a distributed tracing system.

This allows you to see the how long the whole operation took, as well how much time was spent in each service.

zipkin screen shot

Requirements

  • Composer
  • Docker (optional, if you have a zipkin endpoint this is not needed)

Running the example

This example has two services: frontend and backend. They both report trace data to zipkin.

To setup the demo, do

composer install

Once the dependencies are installed, run the services:

# Run zipkin (optional):
composer run-zipkin

# In terminal 1:
composer run-frontend

# In terminal 2
composer run-backend

And then, request the frontend:

curl http://localhost:8081
  1. This starts a trace in the frontend (http://localhost:8081/)
  2. Continues the trace and calls the backend (http://localhost:9000)
  3. Next, you can view traces that went through the backend via http://localhost:9411/?serviceName=frontend.

Running example with a custom zipkin location:

If you need to pass the zipkin endpoint, just pass the reporter url as HTTP_REPORTER_URL env variable.

# In terminal 1:
HTTP_REPORTER_URL=http://myzipkin:9411/api/v2/span composer run-frontend

# In terminal 2
HTTP_REPORTER_URL=http://myzipkin:9411/api/v2/span composer run-backend
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].