midway-component-jaeger
TypeScript icon, indicating that this package has built-in type declarations

6.13.0 • Public • Published

midway-component-jaeger

Jaeger opentracing client component for midway.js

Version License Conventional Commits

Install

npm i midway-component-jaeger

Usage

Update project src/configuration.ts

import * as jaeger from 'midway-component-jaeger'

@Configuration({
  imports: [
    jaeger,
  ],
  importConfigs: [join(__dirname, 'config')],
})
export class ContainerConfiguration implements ILifeCycle {
}

Update project src/config/config.prod.ts

import { TracerConfig, defaultTracerConfig } from 'midway-component-jaeger'

export const tracer: TracerConfig = {
  ...defaultTracerConfig,
  loggingOutputBody: true,
  reqThrottleMsForPriority: 300,
  tracingConfig: {
    sampler: {
      type: 'probabilistic',
      param: 0.0001,
    },
    reporter: {
      agentHost: '127.0.0.1',
    },
  },
}

Update project src/config/config.(local | unittest).ts

import { TracerConfig, defaultTracerConfig } from 'midway-component-jaeger'

export const tracer: TracerConfig = {
  ...defaultTracerConfig,
  loggingOutputBody: true,
  tracingConfig: {
    sampler: {
      type: 'probabilistic',
      param: 1,
    },
    reporter: {
      agentHost: '127.0.0.1',
    },
  },
}

License

MIT

Package Sidebar

Install

npm i midway-component-jaeger

Weekly Downloads

3

Version

6.13.0

License

MIT

Unpacked Size

48 kB

Total Files

31

Last publish

Collaborators

  • waiting