How to use the jaeger-client/dist/src/thrift.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
* 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;

export interface ThriftProcess {
github open-telemetry / opentelemetry-js / packages / opentelemetry-exporter-jaeger / src / types.ts View on Github external
/** 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;

export interface ThriftProcess {