alanlvle commented on a change in pull request #65:
URL: https://github.com/apache/skywalking-nodejs/pull/65#discussion_r757329393



##########
File path: src/agent/protocol/grpc/AuthInterceptor.ts
##########
@@ -17,23 +17,14 @@
  *
  */
 
-import * as grpc from 'grpc';
-import { InterceptingCall, Listener, Metadata, Requester } from 'grpc';
+import * as grpc from '@grpc/grpc-js';
 import config from '../../../config/AgentConfig';
 
-type Options = { [key: string]: string | number };
 
-export default function AuthInterceptor(options: Options, nextCall: (options: 
Options) => InterceptingCall) {
-  return new grpc.InterceptingCall(
-    nextCall(options),
-    new (class implements Requester {
-      // tslint:disable-next-line:ban-types
-      start(metadata: Metadata, listener: Listener, next: Function) {
-        if (config.authorization) {
-          metadata.add('Authentication', config.authorization);
-        }
-        next(metadata, listener);
-      }
-    })(),
-  );
+export default function AuthInterceptor() { 
+  const mata = new grpc.Metadata()
+  if(config.authorization){

Review comment:
       update 3da6ed9155da8a0aebb36569956adae4bf382a02




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to