Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
wconti27 committed Jan 6, 2025
1 parent 42ba094 commit 57d68a7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions packages/dd-trace/src/opentracing/propagation/text_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ const b3SampledKey = 'x-b3-sampled'
const b3FlagsKey = 'x-b3-flags'
const b3HeaderKey = 'b3'
const sqsdHeaderHey = 'x-aws-sqsd-attr-_datadog'
// AWS X-Ray specific constants
const xrayHeaderKey = 'x-amzn-trace-id'
const xrayRootKey = 'root'
const xrayRootPrefix = '1-'
const xrayParentKey = 'parent'
const xraySampledKey = 'sampled'
const xrayE2EStartTimeKey = 't0'
const xraySelfKey = 'self'
const xrayOriginKey = '_dd.origin'
const xrayDefaultE2EStartTime = '00000000'
const xrayMaxAdditionalBaggageBytes = 256
//
const b3HeaderExpr = /^(([0-9a-f]{16}){1,2}-[0-9a-f]{16}(-[01d](-[0-9a-f]{16})?)?|[01d])$/i
const baggageExpr = new RegExp(`^${baggagePrefix}(.+)$`)
const tagKeyExpr = /^_dd\.p\.[\x21-\x2b\x2d-\x7e]+$/ // ASCII minus spaces and commas
Expand All @@ -46,17 +58,6 @@ const tracestateTagKeyFilter = /[^\x21-\x2b\x2d-\x3c\x3e-\x7e]/g
const tracestateTagValueFilter = /[^\x20-\x2b\x2d-\x3a\x3c-\x7d]/g
const invalidSegment = /^0+$/
const zeroTraceId = '0000000000000000'
// AWS X-Ray specific constants
const xrayHeaderKey = 'x-amzn-trace-id'
const xrayRootKey = 'root'
const xrayRootPrefix = '1-'
const xrayParentKey = 'parent'
const xraySampledKey = 'sampled'
const xrayE2EStartTimeKey = 't0'
const xraySelfKey = 'self'
const xrayOriginKey = '_dd.origin'
const xrayDefaultE2EStartTime = '00000000'
const xrayMaxAdditionalBaggageBytes = 256

class TextMapPropagator {
constructor (config) {
Expand Down

0 comments on commit 57d68a7

Please sign in to comment.