UNPKG

skywalking-backend-js-netease

Version:

The NodeJS agent for Apache SkyWalking

59 lines (58 loc) 1.92 kB
/*! * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /** * For caller set custom span properties. */ declare type CustomConfig = { /** * span operation name, if null, using `${ClassName}/${methodName}` */ operationName?: string; /** * span tags, key is Map.key; * * Map.value format as args[0] or args[0].$method() or args[0].field, calculate as string, for example: * 1. args[0].name().first * 2. args[0].time * 3. args[1].taskName() * 4. args[3] * 5. ... * * calculate error will be ignored. */ tags?: Map<string, string>; /** * such as tags. */ logs?: Map<string, string>; /** * span operation name suffix, join with '/' after operationName * * value format as tags Map.value */ operationNameSuffix?: string[]; }; /** * Typescript Method Decorators for tracing customize method. * * @param config config of this * @returns Typescript Method Decorators */ export default function (config: CustomConfig | string | undefined): (target: Object, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor; export {};