SkyAPM / SkyAPM-nodejs

The NodeJS server side agent for Apache SkyWalking
Apache License 2.0
128 stars 86 forks source link

support SSL? #144

Open Arco1ris opened 3 years ago

Arco1ris commented 3 years ago

When trying to connect to the collector, The agent needs to add a certificate, so I made the following changes

RemoteClient.prototype.connectRemote = function(directServer) {
    const filePath = path.join(__dirname, "../ca.crt");
    const caFile = fs.readFileSync(filePath);
    const channelCreds = grpc.credentials.createSsl(caFile);
    this._managemenet = new ManagementService.ManagementServiceClient(directServer, channelCreds);
    this._tracerSender = new TraceSendService.TraceSegmentReportServiceClient(directServer, grpc.credentials.createInsecure());
};

After starting the project, I found that Endpoint information is Empty。

I want to confirm two questions:

  1. If i want to add a certificate, is it correct? If not, how should it be added?
  2. Why the Endpoint is empty, If it is not caused by the certificat, what could it be?