How to use the jaeger-client/dist/src/util.default function in jaeger-client

To help you get started, we’ve selected a few jaeger-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github census-instrumentation / opencensus-node / packages / opencensus-exporter-jaeger / src / jaeger-driver / index.ts View on Github external
*      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.
 */

import { Link, LinkType, Span } from '@opencensus/core';

// tslint:disable-next-line:variable-name
export const UDPSender = require('jaeger-client/dist/src/reporters/udp_sender')
  .default;
// tslint:disable-next-line:variable-name
export const Utils = require('jaeger-client/dist/src/util').default;
// tslint:disable-next-line:variable-name
export const ThriftUtils = require('jaeger-client/dist/src/thrift').default;

export type TagValue = string | number | boolean;

export interface Tag {
  key: string;
  value: TagValue;
}

export interface Log {
  timestamp: number;
  fields: Tag[];
}

export type SenderCallback = (numSpans: number, err?: string) => void;
github open-telemetry / opentelemetry-js / packages / opentelemetry-exporter-jaeger / src / types.ts View on Github external
port?: number; // default: 6832
  maxPacketSize?: number; // default: 65000
  /** Force a flush on shutdown */
  forceFlush?: boolean; // default: true
  /** Time to wait for an onShutdown flush to finish before closing the sender */
  flushTimeout?: number; // default: 2000
}

// Below require is needed as jaeger-client types does not expose the thrift,
// udp_sender, util etc. modules.

// tslint:disable-next-line:variable-name
export const UDPSender = require('jaeger-client/dist/src/reporters/udp_sender')
  .default;
// tslint:disable-next-line:variable-name
export const Utils = require('jaeger-client/dist/src/util').default;
// tslint:disable-next-line:variable-name
export const ThriftUtils = require('jaeger-client/dist/src/thrift').default;

export type TagValue = string | number | boolean;

export interface Tag {
  key: string;
  value: TagValue;
}

export interface Log {
  timestamp: number;
  fields: Tag[];
}

export type SenderCallback = (numSpans: number, err?: string) => void;
github vulcainjs / vulcain-corejs / src / utils / conventions.ts View on Github external
import * as fs from 'fs';
import { Service } from './../globals/system';
const Utils = require('jaeger-client/dist/src/util').default;

/**
 * Conventions values
 * You can override this values before instantiating application
 *
 * @export
 * @class Conventions
 */
export class Conventions {

    private static _instance: Conventions;

    static getRandomId() {
        return Utils.getRandom64().toString("hex");
    }