opentelemetry-js/examples/grpc-js
Trent Mick 4f9b31b78a
docs: update from deprecated SEMRESATTRS_SERVICE_NAME to ATTR_SERVICE_NAME (#5604)
2025-04-10 07:35:26 +00:00
..
images feat(grpc-js): add @grpc/grpc-js plugin (#1201) 2020-07-21 14:35:06 -07:00
README.md chore(lint): refactor Markdown linting to use markdownlint-cli2 (#4713) 2024-05-21 14:44:23 +02:00
client.js chore(eslint): remove airbnb package (#2955) 2022-05-12 23:52:16 +08:00
helloworld_grpc_pb.js fix: require grpc-js instead of grpc in grpc-js example (#1364) 2020-07-31 09:28:00 -04:00
helloworld_pb.js feat(grpc-js): add @grpc/grpc-js plugin (#1201) 2020-07-21 14:35:06 -07:00
package.json chore!: bump min-supported node to ^18.19.0 || >=20.6.0 (#5397) 2025-01-31 09:18:27 +00:00
server.js chore(eslint): remove airbnb package (#2955) 2022-05-12 23:52:16 +08:00
tracer.js docs: update from deprecated SEMRESATTRS_SERVICE_NAME to ATTR_SERVICE_NAME (#5604) 2025-04-10 07:35:26 +00:00

README.md

Overview

OpenTelemetry gRPC 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.

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 zipkin:server
    
  • Run the client

    # from this directory
    npm run zipkin:client
    

Zipkin UI

zipkin: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)

Zipkin UI showing a trace

Jaeger

  • Run the server

    # from this directory
    npm run jaeger:server
    
  • Run the client

    # from this directory
    npm run jaeger:client
    

Jaeger UI

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

Jaeger UI showing a trace

LICENSE

Apache License 2.0