opentelemetry-js/examples/mysql
Daniel Dyla c5bc4382ec
update examples and getting started for provider and api package (#750)
* chore: rename provider in examples and getting started

* chore: update examples, bench, and getting started for api

* chore: update examples for latest changes

* chore: lint examples
2020-02-05 10:44:05 -08:00
..
images feat: mysql support (#525) 2019-11-27 11:25:29 -08:00
README.md feat: mysql support (#525) 2019-11-27 11:25:29 -08:00
client.js feat: lint examples (#649) 2020-01-24 08:03:04 -05:00
package.json update examples and getting started for provider and api package (#750) 2020-02-05 10:44:05 -08:00
server.js feat: lint examples (#649) 2020-01-24 08:03:04 -05:00
tracer.js update examples and getting started for provider and api package (#750) 2020-02-05 10:44:05 -08:00

README.md

Overview

OpenTelemetry MySQL Instrumentation allows the user to automatically collect trace data and export them to the backend of choice (we can use Zipkin or Jaeger for this example), to give observability to distributed systems.

This is a modification of the HTTP example that executes multiple parallel requests that interact with a MySQL server backend using the mysql npm module. The example displays traces using multiple connection methods.

  • Direct Connection Query
  • Pool Connection Query
  • Cluster Pool Connection Query

Installation

$ # from this directory
$ npm install

Setup Zipkin Tracing or Setup Jaeger Tracing

Run the Application

Zipkin

  • Run the server

    $ # from this directory
    $ npm run server
    
  • Run the client

    $ # from this directory
    $ npm run client
    

Zipkin UI

server script should output the traceid in the terminal (e.g traceid: 4815c3d576d930189725f1f1d1bdfcc6). Go to Zipkin with your browser http://localhost:9411/zipkin/traces/(your-trace-id) (e.g http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)

Jaeger

  • Run the server

    $ # from this directory
    $ npm run server
    
  • Run the client

    $ # from this directory
    $ npm run client
    

Jaeger UI

server script should output the traceid in the terminal (e.g traceid: 4815c3d576d930189725f1f1d1bdfcc6). Go to Jaeger with your browser http://localhost:16686/trace/(your-trace-id) (e.g http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6)

LICENSE

Apache License 2.0