"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.tracedAxios = void 0;
const axios_1 = __importDefault(require("axios"));
const tracing_1 = require("../tracing");
const tracedAxios = (ctx) => {
    const instance = axios_1.default.create();
    const amazonTracingHeader = (0, tracing_1.newAmazonTracingHeader)(ctx);
    // add tracing inteceptor
    instance.interceptors.request.use((request) => {
        request.headers.set(amazonTracingHeader.header, amazonTracingHeader.value);
        return request;
    });
    return instance;
};
exports.tracedAxios = tracedAxios;
//# sourceMappingURL=client.js.map