File

projects/isy-angular-widgets/src/lib/http/zipkin-open-tracing-http-interceptor.ts

Description

Implements the OpenTracingHttpInterceptor using the Zipkin implementation of the OpenTracing standard.

Extends

OpenTracingHttpInterceptor

Index

Properties
Methods

Constructor

constructor()

Constructor that configures an OpenTracingHttpInterceptor to use ZIPKIN standard

Methods

intercept
intercept(req: HttpRequest, next: HttpHandler)

Appends a random traceId and spanId as header to the given request

Parameters :
Name Type Optional Description
req HttpRequest<unknown> No

The request to append to

next HttpHandler No

The HttpHandler to pass the request to

Returns : Observable<HttpEvent<unknown>>

The result Observable

Properties

Protected Readonly spanHeaderName
Type : string
Protected Readonly traceHeaderName
Type : string
import {OpenTracingHttpInterceptor} from './open-tracing-http-interceptor';
import {Injectable} from '@angular/core';
import {OpenTraceHeaders} from './open-tracing-headers';

/**
 * Implements the {@link OpenTracingHttpInterceptor} using the <a href="https://zipkin.io/">Zipkin</a> implementation
 * of the OpenTracing standard.
 */
@Injectable()
export class ZipkinOpenTracingHttpInterceptor extends OpenTracingHttpInterceptor {
  /**
   * Constructor that configures an {@link OpenTracingHttpInterceptor} to use ZIPKIN standard
   */
  constructor() {
    super(OpenTraceHeaders.ZIPKIN_TRACE_ID, OpenTraceHeaders.ZIPKIN_SPAN_ID);
  }
}

results matching ""

    No results matching ""