How to use the @opentelemetry/types.SpanKind.INTERNAL function in @opentelemetry/types

To help you get started, we’ve selected a few @opentelemetry/types 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 Azure / azure-sdk-for-js / sdk / storage / storage-file-share / src / utils / tracing.ts View on Github external
export function createSpan(
  operationName: string,
  tracingOptions: OperationTracingOptions = {}
): { span: Span; spanOptions: SpanOptions } {
  const tracer = getTracer();
  const spanOptions: SpanOptions = {
    ...tracingOptions.spanOptions,
    kind: SpanKind.INTERNAL
  };

  const span = tracer.startSpan(`Azure.Storage.File.${operationName}`, spanOptions);

  let newOptions = tracingOptions.spanOptions || {};
  if (span.isRecording()) {
    newOptions = {
      ...tracingOptions,
      parent: span
    };
  }

  return {
    span,
    spanOptions: newOptions
  };
github Azure / azure-sdk-for-js / sdk / storage / storage-file-datalake / src / utils / tracing.ts View on Github external
export function createSpan(
  operationName: string,
  tracingOptions: OperationTracingOptions = {}
): { span: Span; spanOptions: SpanOptions } {
  const tracer = getTracer();
  const spanOptions: SpanOptions = {
    ...tracingOptions.spanOptions,
    kind: SpanKind.INTERNAL
  };

  const span = tracer.startSpan(`Azure.Storage.DataLake.${operationName}`, spanOptions);

  let newOptions = tracingOptions.spanOptions || {};
  if (span.isRecording()) {
    newOptions = {
      ...tracingOptions,
      parent: span
    };
  }

  return {
    span,
    spanOptions: newOptions
  };
github Azure / azure-sdk-for-js / sdk / storage / storage-queue / src / utils / tracing.ts View on Github external
export function createSpan(
  operationName: string,
  tracingOptions: OperationTracingOptions = {}
): { span: Span; spanOptions: SpanOptions } {
  const tracer = getTracer();
  const spanOptions: SpanOptions = {
    ...tracingOptions.spanOptions,
    kind: SpanKind.INTERNAL
  };

  const span = tracer.startSpan(`Azure.Storage.Queue.${operationName}`, spanOptions);

  let newOptions = tracingOptions.spanOptions || {};
  if (span.isRecording()) {
    newOptions = {
      ...tracingOptions,
      parent: span
    };
  }

  return {
    span,
    spanOptions: newOptions
  };
github Azure / azure-sdk-for-js / sdk / identity / identity / src / util / tracing.ts View on Github external
export function createSpan(
  operationName: string,
  options: GetTokenOptions = {}
): { span: Span; options: GetTokenOptions } {
  const tracer = getTracer();

  const tracingOptions = {
    spanOptions: {},
    ...options.tracingOptions
  };

  tracingOptions.spanOptions = {
    ...tracingOptions.spanOptions,
    kind: SpanKind.INTERNAL
  };

  const span = tracer.startSpan(`Azure.Identity.${operationName}`, tracingOptions.spanOptions);

  let newOptions = options;
  if (span.isRecording()) {
    newOptions = {
      ...options,
      tracingOptions: {
        ...tracingOptions,
        spanOptions: {
          ...tracingOptions.spanOptions,
          parent: span
        }
      }
    };
github Azure / azure-sdk-for-js / sdk / storage / storage-utils / tracing.ts View on Github external
export function createSpan(
  operationName: string,
  tracingOptions: OperationTracingOptions = {}
): { span: Span; spanOptions: SpanOptions } {
  const tracer = getTracer();
  const spanOptions: SpanOptions = {
    ...tracingOptions.spanOptions,
    kind: SpanKind.INTERNAL
  };

  const span = tracer.startSpan(`Azure.Storage.Blob.${operationName}`, spanOptions);

  let newOptions = tracingOptions.spanOptions || {};
  if (span.isRecording()) {
    newOptions = {
      ...tracingOptions,
      parent: span
    };
  }

  return {
    span,
    spanOptions: newOptions
  };
github Azure / azure-sdk-for-js / sdk / appconfiguration / app-configuration / src / internal / tracingHelpers.ts View on Github external
private createSpan(options: T, operationName: keyof TClient) {
    const span = getTracer().startSpan(`${this.baseOperationName}.${operationName}`, {
      ...options.spanOptions,
      kind: SpanKind.INTERNAL
    });

    let newOptions = options;

    if (span.isRecording()) {
      newOptions = Spanner.addParentToOptions(options, span);
    }
    return { span, newOptions };
  }