INNER CODE UNIT · JavaScript

CorrelationIds

getndazn/dazn-lambda-powertools · packages/lambda-powertools-correlation-ids/index.js:3

class CorrelationIds {
  constructor (context = {}) {
    this.context = context
  }

  clearAll () {
    this.context = {}
  }

  replaceAllWith (ctx) {
    this.context = ctx
  }

  set (key, value) {
    if (!key.startsWith('x-correlation-')) {
      key = 'x-correlation-' + key
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…