All Projects → CloudNativeJS → appmetrics-zipkin

CloudNativeJS / appmetrics-zipkin

Licence: other
Provide zipkin integration from appmetrics

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to appmetrics-zipkin

Tropical Fish
Pragmatic 风格的 Java EE 后端开发脚手架,开箱即用。基于 SpringBoot,技术选型采用主流的框架(Mybatis-Plus,Redisson,Xxl-job,Swagger)。项目特点:自定义查询语法, 可以自由组装查询条件查询数据,配合代码生成模块,提高研发效率;自定义 service 方法级别的文档生成规则,在业务方法增加必要的注解,可生成方法调用树,快速把握复杂代码业务逻辑。
Stars: ✭ 142 (+125.4%)
Mutual labels:  zipkin
Spring Boot Cloud
基于 Spring Boot、Spring Cloud、Spring Oauth2 和 Spring Cloud Netflix 等框架构建的微服务项目
Stars: ✭ 2,044 (+3144.44%)
Mutual labels:  zipkin
Opencensus Node
A stats collection and distributed tracing framework
Stars: ✭ 249 (+295.24%)
Mutual labels:  zipkin
Modernarchitectureshop
The Microservices Online Shop is an application with a modern software architecture that is cleanly designed and based on.NET lightweight technologies. The shop has two build variations. The first variant is the classic Microservices Architectural Style. The second one is with Dapr. Dapr has a comprehensive infrastructure for building highly decoupled Microservices; for this reason, I am using Dapr to achieve the noble goal of building a highly scalable application with clean architecture and clean code.
Stars: ✭ 154 (+144.44%)
Mutual labels:  zipkin
Brave Example
A collection of examples how to use brave instrumentation in various frameworks and libraries.
Stars: ✭ 163 (+158.73%)
Mutual labels:  zipkin
Jaeger Php
Jaeger Bindings for PHP OpenTracing API
Stars: ✭ 185 (+193.65%)
Mutual labels:  zipkin
Jetfirecloud
基于SpringCloud Finchley.RELEASE的微服务开发脚手架,整合了spring-security-oauth2、springboot-admin、feign、hystrix、spring-cloud-gateway、turbine等全家桶
Stars: ✭ 129 (+104.76%)
Mutual labels:  zipkin
MovieApp
全栈微服务演示案例~MovieApp
Stars: ✭ 81 (+28.57%)
Mutual labels:  zipkin
Brave
Java distributed tracing implementation compatible with Zipkin backend services.
Stars: ✭ 2,117 (+3260.32%)
Mutual labels:  zipkin
Zipkin
Zipkin is a distributed tracing system
Stars: ✭ 14,969 (+23660.32%)
Mutual labels:  zipkin
Apollo Opentracing
Performance trace your Apollo GraphQL server with Opentracing
Stars: ✭ 154 (+144.44%)
Mutual labels:  zipkin
Ruoyi Cloud
(RuoYi)官方仓库 基于Spring Boot、Spring Cloud & Alibaba的分布式微服务架构权限管理系统
Stars: ✭ 160 (+153.97%)
Mutual labels:  zipkin
Zipkin Php
Zipkin instrumentation for PHP
Stars: ✭ 190 (+201.59%)
Mutual labels:  zipkin
Opencensus Go
A stats collection and distributed tracing framework
Stars: ✭ 1,895 (+2907.94%)
Mutual labels:  zipkin
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 (-74.6%)
Mutual labels:  zipkin
Almost Famous
🌟 Almost-Famous(成名之路) ——卡牌游戏开源项目,架构使用SpringBoot+Netty+Maven+SpringCloud来搭建多进程分布式框架,包括Cloud、Unique、Login、Game、Match、Battle 等服务。
Stars: ✭ 131 (+107.94%)
Mutual labels:  zipkin
Spring Cloud Consul Example
spring-cloud-consul-example is an example for microservices system
Stars: ✭ 175 (+177.78%)
Mutual labels:  zipkin
sample-envoy-proxy
custom implementation of service discovery with envoy and inter-service communication for spring-boot applications
Stars: ✭ 29 (-53.97%)
Mutual labels:  zipkin
haystack-docker
Repository with docker-compose files to start Haystack components in sandbox
Stars: ✭ 17 (-73.02%)
Mutual labels:  zipkin
Gosiris
An actor framework for Go
Stars: ✭ 222 (+252.38%)
Mutual labels:  zipkin

The appmetrics-zipkin module is deprecated.

appmetrics-zipkin provides Zipkin instrumentation of Node.js applications using a single line: require('appmetrics-zipkin').

Unlike other zipkin instrumentation packages, appmetrics-zipkin will automatically inject missing trace header information into any inbound request and use the same value for the outbound request without any user intervention. This gives you a full trace across the http message with out any extra code.

Configure Zipkin Endpoint

Connecting to a Zipkin endpoint is done by adding the desired hostname and port to appmetrics-zipkin.properties file.

Alternatively, the hostname, port and service name (used by Zipkin to identify your application) can be added when including appmetrics-zipkin into your application:

var appzip = require('appmetrics-zipkin')({
  host: 'localhost',
  port: 9411,
  serviceName:'frontend',
  sampleRate: 1.0
});

Note: The properties file has precedence over the inline settings

If no configuration details are provided, the endpoint will be localhost:9411, the serviceName will be set to the program name that requires appmetrics-zipkin and the sample rate will be 1.0 (100% of requests).

Usage

var appzip = require('appmetrics-zipkin');
var express = require('express');
var app = express();


app.get('/api', (req, res) => res.send(new Date().toString()));
app.listen(9000, () => {
  console.log('Backend listening on port 9000!');
});

Note: require('appmetrics-zipkin') must be included before requiring other packages to ensure those packages are correctly instrumented. Failure to do can result in spans not being sent to the Zipkin server.

Using Zipkin with Node.js and Kubernetes

Deploy the Zipkin service with a given service name and exposure type, for example, naming the service zipkin and choosing to expose the service via the NodePort mechanism.

Your Node.js code to send Zipkin traffic to the discovered server would be as follows:

var zipkinHost = "localhost"
var zipkinPort = 9411  

if (process.env.ZIPKIN_SERVICE_HOST && process.env.ZIPKIN_SERVICE_PORT) {
  console.log("Routing Zipkin traffic to the Zipkin Kubernetes service")
  zipkinHost = process.env.ZIPKIN_SERVICE_HOST
  zipkinPort = process.env.ZIPKIN_SERVICE_PORT
} else {
  console.log("Detected we're running the Zipkin server locally")
}

var appzip = require('appmetrics-zipkin')({
  host: zipkinHost,
  port: zipkinPort,
  serviceName:'my-kube-frontend',
  sampleRate: 1.0
});

You can see if the environment variables are present with the following commands.

Use kubectl get pods to discover the pod of your Zipkin deployment.

Use kubectl exec -it <the pod name from above> printenv | grep SERVICE to determine the environment variables present for the Zipkin service.

Example output:

[Node.js@IBM icp-nodejs-sample]$ kubectl exec -it test-zipkin-289126497-pjf5b printenv | grep SERVICE
ZIPKIN_SERVICE_HOST=10.0.0.105
ZIPKIN_SERVICE_PORT=9411

Module Long Term Support Policy

This module adopts the Module Long Term Support (LTS) policy, with the following End Of Life (EOL) dates:

Module Version Release Date Minimum EOL EOL With Status
V1.x.x Oct 2017 Dec 2019 Current

License

Apache-2.0

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].