"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.withHttpTracing = void 0;
const api_1 = require("@opentelemetry/api");
const constants_1 = require("./constants");
const tracer_1 = require("./tracer");
const withHttpTracing = (eventHandler) => (event, context) => {
    const parentContext = api_1.propagation.extract(api_1.ROOT_CONTEXT, event.headers);
    return (0, tracer_1.withTracing)(constants_1.TRACING_START_LAMBDA_REQUEST, () => eventHandler(event, context), parentContext);
};
exports.withHttpTracing = withHttpTracing;
//# sourceMappingURL=http.js.map