Comments (1)
Hi! We are planning to add tracing to a nodejs project. Due to some reasons, we cannot use the below way to instrument our code.
require("skyapm-nodejs").start({ serviceName: "test", });
So we are wondering if SkyAPM-nodejs supports to use in Opentracing way? Just like below:
// Replace this line with the tracer implementation of your choice.
const tracer = new opentracing.Tracer(); //any method we can new a SkyAPM-nodejs tracer ?
const span = tracer.startSpan('http_request');
const opts = {
host : 'example.com',
method: 'GET',
port : '80',
path: '/',
};
http.request(opts, res => {
res.setEncoding('utf8');
res.on('error', err => {
// assuming no retries, mark the span as failed
span.setTag(opentracing.Tags.ERROR, true);
span.log({'event': 'error', 'error.object': err, 'message': err.message, 'stack': err.stack});
span.finish();
});
res.on('data', chunk => {
span.log({'event': 'data_received', 'chunk_length': chunk.length});
});
res.on('end', () => {
span.log({'event': 'request_end'});
span.finish();
});
}).end();
from skyapm-nodejs.
Related Issues (20)
- When will 2.0.0 be released to support sw8? HOT 1
- encounter an error when packing
- Version 2.0.0 HOT 4
- SIGTERM HOT 2
- Whether skyWalking8.0 is supported on skyapm-nodejs HOT 7
- How to customize traceid generation rules? HOT 8
- Node JS12 is supported by Skywalking 7.0.0 HOT 4
- ContextCarrier.prototype.serialize should encode _parentService and _parentServiceInstance HOT 2
- egg服务在压测之后,无法生成新的trace日志
- Nodejs agent segment not finish when high level QPS HOT 4
- WrapEmit unable to handle error correctly
- mysql createPoolCluster will generate new tracerId
- await will generate new tracerId
- add support rabbitmq? HOT 1
- Typescript support ?
- Segmentation fault HOT 1
- support SSL?
- Close agent when server returns PERMISSION_DENIED HOT 3
- egg,egg-core模块无法追踪 HOT 1
- nuxt项目中应该如何使用? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skyapm-nodejs.