autotel-aws 0.12.18 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{config-DxjTT8jd.d.ts → config-DbZv4bpy.d.ts} +1 -1
- package/dist/{config-C7zV8Zm6.d.cts → config-srkLBXZH.d.cts} +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/lambda.d.cts +4 -4
- package/dist/lambda.d.ts +4 -4
- package/dist/sdk.d.cts +3 -2
- package/dist/sdk.d.ts +3 -2
- package/dist/testing.cjs +9 -0
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +3 -2
- package/dist/testing.d.ts +3 -2
- package/dist/testing.js +9 -0
- package/dist/testing.js.map +1 -1
- package/dist/{types-kTFVdSqO.d.cts → types-B2Mi8Goj.d.cts} +1 -1
- package/dist/{types-3_ak5jhy.d.cts → types-B9IaHmGa.d.cts} +7 -10
- package/dist/{types-3_ak5jhy.d.ts → types-B9IaHmGa.d.ts} +7 -10
- package/dist/{types-UiBv_I_M.d.ts → types-BqTI4s4V.d.ts} +1 -1
- package/dist/xray.d.cts +3 -2
- package/dist/xray.d.ts +3 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as AWSInitConfig } from './config-
|
|
2
|
-
export { a as AWSResourceDetectorConfig, L as LambdaInstrumentationConfig, S as SDKInstrumentationConfig, X as XRayConfig, m as mergeServiceConfig } from './config-
|
|
3
|
-
import { b as AWSCommandMetadata } from './types-
|
|
4
|
-
export { A as AWSServiceConfig, E as ExtractedTraceContext, a as LambdaContext, L as LambdaEvent, X as XRayAnnotation } from './types-
|
|
1
|
+
import { A as AWSInitConfig } from './config-srkLBXZH.cjs';
|
|
2
|
+
export { a as AWSResourceDetectorConfig, L as LambdaInstrumentationConfig, S as SDKInstrumentationConfig, X as XRayConfig, m as mergeServiceConfig } from './config-srkLBXZH.cjs';
|
|
3
|
+
import { b as AWSCommandMetadata } from './types-B9IaHmGa.cjs';
|
|
4
|
+
export { A as AWSServiceConfig, E as ExtractedTraceContext, a as LambdaContext, L as LambdaEvent, X as XRayAnnotation } from './types-B9IaHmGa.cjs';
|
|
5
5
|
export { AWS_ATTRS, buildDynamoDBAttributes, buildEventBridgeAttributes, buildKinesisAttributes, buildLambdaAttributes, buildS3Attributes, buildSDKAttributes, buildSNSAttributes, buildSQSAttributes, buildStepFunctionsAttributes } from './attributes.cjs';
|
|
6
6
|
import { Client } from '@aws-sdk/smithy-client';
|
|
7
7
|
export { LambdaMiddleware, detectTriggerType, extractTraceContext, getContextFromRequest, getSpanFromRequest, traceLambda, tracingMiddleware, wrapHandler } from './lambda.cjs';
|
|
8
|
-
export { L as LambdaHandler, a as LambdaTrigger } from './types-
|
|
8
|
+
export { L as LambdaHandler, a as LambdaTrigger } from './types-B2Mi8Goj.cjs';
|
|
9
9
|
export { autoInstrumentAWS, createTracedClient, disableAutoInstrumentAWS, instrumentSDK, isAutoInstrumentEnabled } from './sdk.cjs';
|
|
10
10
|
export { TraceS3Config, traceS3 } from './s3.cjs';
|
|
11
11
|
export { TraceDynamoDBConfig, traceDynamoDB } from './dynamodb.cjs';
|
|
@@ -15,10 +15,10 @@ export { KinesisConsumer, KinesisConsumerConfig, KinesisProducer, KinesisProduce
|
|
|
15
15
|
export { ExecutionInput, StepFunctionsActivityWorker, StepFunctionsActivityWorkerConfig, StepFunctionsExecutor, StepFunctionsExecutorConfig, TraceStepFunctionConfig, extractStepFunctionsContext, injectTraceContext, stripTraceContext, traceStepFunction } from './step-functions.cjs';
|
|
16
16
|
export { configureXRay, setXRayAnnotation, setXRayMetadata } from './xray.cjs';
|
|
17
17
|
export { AWSXRayPropagator as XRayPropagator } from '@opentelemetry/propagator-aws-xray';
|
|
18
|
+
import 'aws-lambda';
|
|
18
19
|
import '@opentelemetry/api';
|
|
19
20
|
import 'autotel';
|
|
20
21
|
import '@middy/core';
|
|
21
|
-
import 'aws-lambda';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* AWS error classification and handling
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as AWSInitConfig } from './config-
|
|
2
|
-
export { a as AWSResourceDetectorConfig, L as LambdaInstrumentationConfig, S as SDKInstrumentationConfig, X as XRayConfig, m as mergeServiceConfig } from './config-
|
|
3
|
-
import { b as AWSCommandMetadata } from './types-
|
|
4
|
-
export { A as AWSServiceConfig, E as ExtractedTraceContext, a as LambdaContext, L as LambdaEvent, X as XRayAnnotation } from './types-
|
|
1
|
+
import { A as AWSInitConfig } from './config-DbZv4bpy.js';
|
|
2
|
+
export { a as AWSResourceDetectorConfig, L as LambdaInstrumentationConfig, S as SDKInstrumentationConfig, X as XRayConfig, m as mergeServiceConfig } from './config-DbZv4bpy.js';
|
|
3
|
+
import { b as AWSCommandMetadata } from './types-B9IaHmGa.js';
|
|
4
|
+
export { A as AWSServiceConfig, E as ExtractedTraceContext, a as LambdaContext, L as LambdaEvent, X as XRayAnnotation } from './types-B9IaHmGa.js';
|
|
5
5
|
export { AWS_ATTRS, buildDynamoDBAttributes, buildEventBridgeAttributes, buildKinesisAttributes, buildLambdaAttributes, buildS3Attributes, buildSDKAttributes, buildSNSAttributes, buildSQSAttributes, buildStepFunctionsAttributes } from './attributes.js';
|
|
6
6
|
import { Client } from '@aws-sdk/smithy-client';
|
|
7
7
|
export { LambdaMiddleware, detectTriggerType, extractTraceContext, getContextFromRequest, getSpanFromRequest, traceLambda, tracingMiddleware, wrapHandler } from './lambda.js';
|
|
8
|
-
export { L as LambdaHandler, a as LambdaTrigger } from './types-
|
|
8
|
+
export { L as LambdaHandler, a as LambdaTrigger } from './types-BqTI4s4V.js';
|
|
9
9
|
export { autoInstrumentAWS, createTracedClient, disableAutoInstrumentAWS, instrumentSDK, isAutoInstrumentEnabled } from './sdk.js';
|
|
10
10
|
export { TraceS3Config, traceS3 } from './s3.js';
|
|
11
11
|
export { TraceDynamoDBConfig, traceDynamoDB } from './dynamodb.js';
|
|
@@ -15,10 +15,10 @@ export { KinesisConsumer, KinesisConsumerConfig, KinesisProducer, KinesisProduce
|
|
|
15
15
|
export { ExecutionInput, StepFunctionsActivityWorker, StepFunctionsActivityWorkerConfig, StepFunctionsExecutor, StepFunctionsExecutorConfig, TraceStepFunctionConfig, extractStepFunctionsContext, injectTraceContext, stripTraceContext, traceStepFunction } from './step-functions.js';
|
|
16
16
|
export { configureXRay, setXRayAnnotation, setXRayMetadata } from './xray.js';
|
|
17
17
|
export { AWSXRayPropagator as XRayPropagator } from '@opentelemetry/propagator-aws-xray';
|
|
18
|
+
import 'aws-lambda';
|
|
18
19
|
import '@opentelemetry/api';
|
|
19
20
|
import 'autotel';
|
|
20
21
|
import '@middy/core';
|
|
21
|
-
import 'aws-lambda';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* AWS error classification and handling
|
package/dist/lambda.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TraceContext } from 'autotel';
|
|
2
|
-
import { L as LambdaHandler } from './types-
|
|
3
|
-
export { a as LambdaTrigger } from './types-
|
|
4
|
-
import { L as LambdaEvent } from './types-
|
|
5
|
-
import { L as LambdaInstrumentationConfig } from './config-
|
|
2
|
+
import { L as LambdaHandler } from './types-B2Mi8Goj.cjs';
|
|
3
|
+
export { a as LambdaTrigger } from './types-B2Mi8Goj.cjs';
|
|
4
|
+
import { L as LambdaEvent } from './types-B9IaHmGa.cjs';
|
|
5
|
+
import { L as LambdaInstrumentationConfig } from './config-srkLBXZH.cjs';
|
|
6
6
|
import { MiddlewareObj, Request } from '@middy/core';
|
|
7
7
|
import { Context } from 'aws-lambda';
|
|
8
8
|
import { Context as Context$1, Span, SpanContext } from '@opentelemetry/api';
|
package/dist/lambda.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TraceContext } from 'autotel';
|
|
2
|
-
import { L as LambdaHandler } from './types-
|
|
3
|
-
export { a as LambdaTrigger } from './types-
|
|
4
|
-
import { L as LambdaEvent } from './types-
|
|
5
|
-
import { L as LambdaInstrumentationConfig } from './config-
|
|
2
|
+
import { L as LambdaHandler } from './types-BqTI4s4V.js';
|
|
3
|
+
export { a as LambdaTrigger } from './types-BqTI4s4V.js';
|
|
4
|
+
import { L as LambdaEvent } from './types-B9IaHmGa.js';
|
|
5
|
+
import { L as LambdaInstrumentationConfig } from './config-DbZv4bpy.js';
|
|
6
6
|
import { MiddlewareObj, Request } from '@middy/core';
|
|
7
7
|
import { Context } from 'aws-lambda';
|
|
8
8
|
import { Context as Context$1, Span, SpanContext } from '@opentelemetry/api';
|
package/dist/sdk.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Client } from '@aws-sdk/smithy-client';
|
|
2
|
-
import { S as SDKInstrumentationConfig } from './config-
|
|
3
|
-
import './types-
|
|
2
|
+
import { S as SDKInstrumentationConfig } from './config-srkLBXZH.cjs';
|
|
3
|
+
import './types-B9IaHmGa.cjs';
|
|
4
|
+
import 'aws-lambda';
|
|
4
5
|
import '@opentelemetry/api';
|
|
5
6
|
|
|
6
7
|
/**
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Client } from '@aws-sdk/smithy-client';
|
|
2
|
-
import { S as SDKInstrumentationConfig } from './config-
|
|
3
|
-
import './types-
|
|
2
|
+
import { S as SDKInstrumentationConfig } from './config-DbZv4bpy.js';
|
|
3
|
+
import './types-B9IaHmGa.js';
|
|
4
|
+
import 'aws-lambda';
|
|
4
5
|
import '@opentelemetry/api';
|
|
5
6
|
|
|
6
7
|
/**
|
package/dist/testing.cjs
CHANGED
|
@@ -5,12 +5,21 @@ require('./chunk-JEQ2X3Z6.cjs');
|
|
|
5
5
|
// src/testing/lambda-harness.ts
|
|
6
6
|
function createMockLambdaContext(overrides) {
|
|
7
7
|
return {
|
|
8
|
+
callbackWaitsForEmptyEventLoop: true,
|
|
8
9
|
awsRequestId: "test-request-id",
|
|
9
10
|
functionName: "test-function",
|
|
10
11
|
functionVersion: "$LATEST",
|
|
11
12
|
invokedFunctionArn: "arn:aws:lambda:us-east-1:123456789012:function:test-function",
|
|
12
13
|
memoryLimitInMB: "128",
|
|
14
|
+
logGroupName: "/aws/lambda/test-function",
|
|
15
|
+
logStreamName: "2026/01/01/[$LATEST]test",
|
|
13
16
|
getRemainingTimeInMillis: () => 3e4,
|
|
17
|
+
done: () => {
|
|
18
|
+
},
|
|
19
|
+
fail: () => {
|
|
20
|
+
},
|
|
21
|
+
succeed: () => {
|
|
22
|
+
},
|
|
14
23
|
...overrides
|
|
15
24
|
};
|
|
16
25
|
}
|
package/dist/testing.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/testing/lambda-harness.ts","../src/testing/localstack.ts"],"names":[],"mappings":";;;;;AAUO,SAAS,wBAAwB,SAAA,EAAmD;AACzF,EAAA,OAAO;AAAA,IACL,YAAA,EAAc,iBAAA;AAAA,IACd,YAAA,EAAc,eAAA;AAAA,IACd,eAAA,EAAiB,SAAA;AAAA,IACjB,kBAAA,EAAoB,8DAAA;AAAA,IACpB,eAAA,EAAiB,KAAA;AAAA,IACjB,0BAA0B,MAAM,GAAA;AAAA,IAChC,GAAG;AAAA,GACL;AACF;AAKO,SAAS,uBAAA,GAA0B;AACxC,EAAA,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM,MAAA,CACJ,OAAA,EACA,KAAA,EACA,OAAA,EACkB;AAClB,MAAA,MAAM,WAAA,GAAc,wBAAwB,OAAO,CAAA;AACnD,MAAA,OAAO,OAAA,CAAQ,OAAO,WAAW,CAAA;AAAA,IACnC;AAAA,GACF;AACF;;;
|
|
1
|
+
{"version":3,"sources":["../src/testing/lambda-harness.ts","../src/testing/localstack.ts"],"names":[],"mappings":";;;;;AAUO,SAAS,wBAAwB,SAAA,EAAmD;AACzF,EAAA,OAAO;AAAA,IACL,8BAAA,EAAgC,IAAA;AAAA,IAChC,YAAA,EAAc,iBAAA;AAAA,IACd,YAAA,EAAc,eAAA;AAAA,IACd,eAAA,EAAiB,SAAA;AAAA,IACjB,kBAAA,EAAoB,8DAAA;AAAA,IACpB,eAAA,EAAiB,KAAA;AAAA,IACjB,YAAA,EAAc,2BAAA;AAAA,IACd,aAAA,EAAe,0BAAA;AAAA,IACf,0BAA0B,MAAM,GAAA;AAAA,IAChC,MAAM,MAAM;AAAA,IAAC,CAAA;AAAA,IACb,MAAM,MAAM;AAAA,IAAC,CAAA;AAAA,IACb,SAAS,MAAM;AAAA,IAAC,CAAA;AAAA,IAChB,GAAG;AAAA,GACL;AACF;AAKO,SAAS,uBAAA,GAA0B;AACxC,EAAA,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM,MAAA,CACJ,OAAA,EACA,KAAA,EACA,OAAA,EACkB;AAClB,MAAA,MAAM,WAAA,GAAc,wBAAwB,OAAO,CAAA;AACnD,MAAA,OAAO,OAAA,CAAQ,OAAO,WAAW,CAAA;AAAA,IACnC;AAAA,GACF;AACF;;;ACpCO,SAAS,uBAAA,GAA0B;AACxC,EAAA,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY,QAAA,EAA0B;AACpC,MAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,GAAA,CAAI,eAAA,IAAmB,WAAA;AAC5C,MAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,GAAA,CAAI,eAAA,IAAmB,MAAA;AAC5C,MAAA,OAAO,CAAA,OAAA,EAAU,IAAI,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA;AAAA,IAC/B,CAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAM,WAAA,GAAgC;AACpC,MAAA,IAAI;AACF,QAAA,MAAM,WAAW,MAAM,KAAA;AAAA,UACrB,CAAA,EAAG,IAAA,CAAK,WAAA,CAAY,QAAQ,CAAC,CAAA,mBAAA,CAAA;AAAA,UAC7B,EAAE,QAAQ,KAAA;AAAM,SAClB;AACA,QAAA,OAAO,QAAA,CAAS,EAAA;AAAA,MAClB,CAAA,CAAA,MAAQ;AACN,QAAA,OAAO,KAAA;AAAA,MACT;AAAA,IACF;AAAA,GACF;AACF","file":"testing.cjs","sourcesContent":["/**\n * Lambda test harness utilities\n */\n\nimport type { LambdaHandler } from '../lambda/types';\nimport type { LambdaContext } from '../types';\n\n/**\n * Mock Lambda context for testing\n */\nexport function createMockLambdaContext(overrides?: Partial<LambdaContext>): LambdaContext {\n return {\n callbackWaitsForEmptyEventLoop: true,\n awsRequestId: 'test-request-id',\n functionName: 'test-function',\n functionVersion: '$LATEST',\n invokedFunctionArn: 'arn:aws:lambda:us-east-1:123456789012:function:test-function',\n memoryLimitInMB: '128',\n logGroupName: '/aws/lambda/test-function',\n logStreamName: '2026/01/01/[$LATEST]test',\n getRemainingTimeInMillis: () => 30_000,\n done: () => {},\n fail: () => {},\n succeed: () => {},\n ...overrides,\n };\n}\n\n/**\n * Lambda test harness\n */\nexport function createLambdaTestHarness() {\n return {\n /**\n * Invoke a Lambda handler with test event and context\n */\n async invoke<TEvent, TResult>(\n handler: LambdaHandler<TEvent, TResult>,\n event: TEvent,\n context?: Partial<LambdaContext>\n ): Promise<TResult> {\n const mockContext = createMockLambdaContext(context);\n return handler(event, mockContext);\n },\n };\n}\n","/**\n * LocalStack integration helpers\n *\n * LocalStack is a cloud service emulator for local AWS development and testing.\n */\n\n/**\n * Create LocalStack helpers for testing\n */\nexport function createLocalStackHelpers() {\n return {\n /**\n * Get LocalStack endpoint URL\n * @param _service - Service name (currently unused, all services use same endpoint)\n */\n getEndpoint(_service: string): string {\n const host = process.env.LOCALSTACK_HOST || 'localhost';\n const port = process.env.LOCALSTACK_PORT || '4566';\n return `http://${host}:${port}`;\n },\n\n /**\n * Check if LocalStack is available\n */\n async isAvailable(): Promise<boolean> {\n try {\n const response = await fetch(\n `${this.getEndpoint('health')}/_localstack/health`,\n { method: 'GET' }\n );\n return response.ok;\n } catch {\n return false;\n }\n },\n };\n}\n"]}
|
package/dist/testing.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { L as LambdaHandler } from './types-
|
|
2
|
-
import { a as LambdaContext } from './types-
|
|
1
|
+
import { L as LambdaHandler } from './types-B2Mi8Goj.cjs';
|
|
2
|
+
import { a as LambdaContext } from './types-B9IaHmGa.cjs';
|
|
3
|
+
import 'aws-lambda';
|
|
3
4
|
import '@opentelemetry/api';
|
|
4
5
|
|
|
5
6
|
/**
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { L as LambdaHandler } from './types-
|
|
2
|
-
import { a as LambdaContext } from './types-
|
|
1
|
+
import { L as LambdaHandler } from './types-BqTI4s4V.js';
|
|
2
|
+
import { a as LambdaContext } from './types-B9IaHmGa.js';
|
|
3
|
+
import 'aws-lambda';
|
|
3
4
|
import '@opentelemetry/api';
|
|
4
5
|
|
|
5
6
|
/**
|
package/dist/testing.js
CHANGED
|
@@ -3,12 +3,21 @@ import './chunk-DGUM43GV.js';
|
|
|
3
3
|
// src/testing/lambda-harness.ts
|
|
4
4
|
function createMockLambdaContext(overrides) {
|
|
5
5
|
return {
|
|
6
|
+
callbackWaitsForEmptyEventLoop: true,
|
|
6
7
|
awsRequestId: "test-request-id",
|
|
7
8
|
functionName: "test-function",
|
|
8
9
|
functionVersion: "$LATEST",
|
|
9
10
|
invokedFunctionArn: "arn:aws:lambda:us-east-1:123456789012:function:test-function",
|
|
10
11
|
memoryLimitInMB: "128",
|
|
12
|
+
logGroupName: "/aws/lambda/test-function",
|
|
13
|
+
logStreamName: "2026/01/01/[$LATEST]test",
|
|
11
14
|
getRemainingTimeInMillis: () => 3e4,
|
|
15
|
+
done: () => {
|
|
16
|
+
},
|
|
17
|
+
fail: () => {
|
|
18
|
+
},
|
|
19
|
+
succeed: () => {
|
|
20
|
+
},
|
|
12
21
|
...overrides
|
|
13
22
|
};
|
|
14
23
|
}
|
package/dist/testing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/testing/lambda-harness.ts","../src/testing/localstack.ts"],"names":[],"mappings":";;;AAUO,SAAS,wBAAwB,SAAA,EAAmD;AACzF,EAAA,OAAO;AAAA,IACL,YAAA,EAAc,iBAAA;AAAA,IACd,YAAA,EAAc,eAAA;AAAA,IACd,eAAA,EAAiB,SAAA;AAAA,IACjB,kBAAA,EAAoB,8DAAA;AAAA,IACpB,eAAA,EAAiB,KAAA;AAAA,IACjB,0BAA0B,MAAM,GAAA;AAAA,IAChC,GAAG;AAAA,GACL;AACF;AAKO,SAAS,uBAAA,GAA0B;AACxC,EAAA,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM,MAAA,CACJ,OAAA,EACA,KAAA,EACA,OAAA,EACkB;AAClB,MAAA,MAAM,WAAA,GAAc,wBAAwB,OAAO,CAAA;AACnD,MAAA,OAAO,OAAA,CAAQ,OAAO,WAAW,CAAA;AAAA,IACnC;AAAA,GACF;AACF;;;
|
|
1
|
+
{"version":3,"sources":["../src/testing/lambda-harness.ts","../src/testing/localstack.ts"],"names":[],"mappings":";;;AAUO,SAAS,wBAAwB,SAAA,EAAmD;AACzF,EAAA,OAAO;AAAA,IACL,8BAAA,EAAgC,IAAA;AAAA,IAChC,YAAA,EAAc,iBAAA;AAAA,IACd,YAAA,EAAc,eAAA;AAAA,IACd,eAAA,EAAiB,SAAA;AAAA,IACjB,kBAAA,EAAoB,8DAAA;AAAA,IACpB,eAAA,EAAiB,KAAA;AAAA,IACjB,YAAA,EAAc,2BAAA;AAAA,IACd,aAAA,EAAe,0BAAA;AAAA,IACf,0BAA0B,MAAM,GAAA;AAAA,IAChC,MAAM,MAAM;AAAA,IAAC,CAAA;AAAA,IACb,MAAM,MAAM;AAAA,IAAC,CAAA;AAAA,IACb,SAAS,MAAM;AAAA,IAAC,CAAA;AAAA,IAChB,GAAG;AAAA,GACL;AACF;AAKO,SAAS,uBAAA,GAA0B;AACxC,EAAA,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM,MAAA,CACJ,OAAA,EACA,KAAA,EACA,OAAA,EACkB;AAClB,MAAA,MAAM,WAAA,GAAc,wBAAwB,OAAO,CAAA;AACnD,MAAA,OAAO,OAAA,CAAQ,OAAO,WAAW,CAAA;AAAA,IACnC;AAAA,GACF;AACF;;;ACpCO,SAAS,uBAAA,GAA0B;AACxC,EAAA,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY,QAAA,EAA0B;AACpC,MAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,GAAA,CAAI,eAAA,IAAmB,WAAA;AAC5C,MAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,GAAA,CAAI,eAAA,IAAmB,MAAA;AAC5C,MAAA,OAAO,CAAA,OAAA,EAAU,IAAI,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA;AAAA,IAC/B,CAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAM,WAAA,GAAgC;AACpC,MAAA,IAAI;AACF,QAAA,MAAM,WAAW,MAAM,KAAA;AAAA,UACrB,CAAA,EAAG,IAAA,CAAK,WAAA,CAAY,QAAQ,CAAC,CAAA,mBAAA,CAAA;AAAA,UAC7B,EAAE,QAAQ,KAAA;AAAM,SAClB;AACA,QAAA,OAAO,QAAA,CAAS,EAAA;AAAA,MAClB,CAAA,CAAA,MAAQ;AACN,QAAA,OAAO,KAAA;AAAA,MACT;AAAA,IACF;AAAA,GACF;AACF","file":"testing.js","sourcesContent":["/**\n * Lambda test harness utilities\n */\n\nimport type { LambdaHandler } from '../lambda/types';\nimport type { LambdaContext } from '../types';\n\n/**\n * Mock Lambda context for testing\n */\nexport function createMockLambdaContext(overrides?: Partial<LambdaContext>): LambdaContext {\n return {\n callbackWaitsForEmptyEventLoop: true,\n awsRequestId: 'test-request-id',\n functionName: 'test-function',\n functionVersion: '$LATEST',\n invokedFunctionArn: 'arn:aws:lambda:us-east-1:123456789012:function:test-function',\n memoryLimitInMB: '128',\n logGroupName: '/aws/lambda/test-function',\n logStreamName: '2026/01/01/[$LATEST]test',\n getRemainingTimeInMillis: () => 30_000,\n done: () => {},\n fail: () => {},\n succeed: () => {},\n ...overrides,\n };\n}\n\n/**\n * Lambda test harness\n */\nexport function createLambdaTestHarness() {\n return {\n /**\n * Invoke a Lambda handler with test event and context\n */\n async invoke<TEvent, TResult>(\n handler: LambdaHandler<TEvent, TResult>,\n event: TEvent,\n context?: Partial<LambdaContext>\n ): Promise<TResult> {\n const mockContext = createMockLambdaContext(context);\n return handler(event, mockContext);\n },\n };\n}\n","/**\n * LocalStack integration helpers\n *\n * LocalStack is a cloud service emulator for local AWS development and testing.\n */\n\n/**\n * Create LocalStack helpers for testing\n */\nexport function createLocalStackHelpers() {\n return {\n /**\n * Get LocalStack endpoint URL\n * @param _service - Service name (currently unused, all services use same endpoint)\n */\n getEndpoint(_service: string): string {\n const host = process.env.LOCALSTACK_HOST || 'localhost';\n const port = process.env.LOCALSTACK_PORT || '4566';\n return `http://${host}:${port}`;\n },\n\n /**\n * Check if LocalStack is available\n */\n async isAvailable(): Promise<boolean> {\n try {\n const response = await fetch(\n `${this.getEndpoint('health')}/_localstack/health`,\n { method: 'GET' }\n );\n return response.ok;\n } catch {\n return false;\n }\n },\n };\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Context } from 'aws-lambda';
|
|
1
2
|
import { SpanContext } from '@opentelemetry/api';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -28,17 +29,13 @@ interface LambdaEvent {
|
|
|
28
29
|
[key: string]: unknown;
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
|
-
* AWS Lambda context
|
|
32
|
+
* AWS Lambda context.
|
|
33
|
+
*
|
|
34
|
+
* Aliased to `aws-lambda`'s `Context` so consumers can pass a standard
|
|
35
|
+
* Lambda context through `wrapHandler`/`traceLambda`/`tracingMiddleware`
|
|
36
|
+
* without narrowing or casting.
|
|
32
37
|
*/
|
|
33
|
-
|
|
34
|
-
awsRequestId: string;
|
|
35
|
-
functionName: string;
|
|
36
|
-
functionVersion: string;
|
|
37
|
-
invokedFunctionArn: string;
|
|
38
|
-
memoryLimitInMB: string;
|
|
39
|
-
getRemainingTimeInMillis: () => number;
|
|
40
|
-
[key: string]: unknown;
|
|
41
|
-
}
|
|
38
|
+
type LambdaContext = Context;
|
|
42
39
|
/**
|
|
43
40
|
* AWS SDK v3 command metadata
|
|
44
41
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Context } from 'aws-lambda';
|
|
1
2
|
import { SpanContext } from '@opentelemetry/api';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -28,17 +29,13 @@ interface LambdaEvent {
|
|
|
28
29
|
[key: string]: unknown;
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
|
-
* AWS Lambda context
|
|
32
|
+
* AWS Lambda context.
|
|
33
|
+
*
|
|
34
|
+
* Aliased to `aws-lambda`'s `Context` so consumers can pass a standard
|
|
35
|
+
* Lambda context through `wrapHandler`/`traceLambda`/`tracingMiddleware`
|
|
36
|
+
* without narrowing or casting.
|
|
32
37
|
*/
|
|
33
|
-
|
|
34
|
-
awsRequestId: string;
|
|
35
|
-
functionName: string;
|
|
36
|
-
functionVersion: string;
|
|
37
|
-
invokedFunctionArn: string;
|
|
38
|
-
memoryLimitInMB: string;
|
|
39
|
-
getRemainingTimeInMillis: () => number;
|
|
40
|
-
[key: string]: unknown;
|
|
41
|
-
}
|
|
38
|
+
type LambdaContext = Context;
|
|
42
39
|
/**
|
|
43
40
|
* AWS SDK v3 command metadata
|
|
44
41
|
*/
|
package/dist/xray.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { X as XRayConfig } from './config-
|
|
1
|
+
import { X as XRayConfig } from './config-srkLBXZH.cjs';
|
|
2
2
|
export { AWSXRayPropagator as XRayPropagator } from '@opentelemetry/propagator-aws-xray';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-B9IaHmGa.cjs';
|
|
4
|
+
import 'aws-lambda';
|
|
4
5
|
import '@opentelemetry/api';
|
|
5
6
|
|
|
6
7
|
/**
|
package/dist/xray.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { X as XRayConfig } from './config-
|
|
1
|
+
import { X as XRayConfig } from './config-DbZv4bpy.js';
|
|
2
2
|
export { AWSXRayPropagator as XRayPropagator } from '@opentelemetry/propagator-aws-xray';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-B9IaHmGa.js';
|
|
4
|
+
import 'aws-lambda';
|
|
4
5
|
import '@opentelemetry/api';
|
|
5
6
|
|
|
6
7
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autotel-aws",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "OpenTelemetry instrumentation for AWS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -180,6 +180,7 @@
|
|
|
180
180
|
"@opentelemetry/api": "^1.9.1",
|
|
181
181
|
"@opentelemetry/semantic-conventions": "^1.41.1",
|
|
182
182
|
"@opentelemetry/propagator-aws-xray": "^2.2.0",
|
|
183
|
+
"@types/aws-lambda": "^8.10.161",
|
|
183
184
|
"autotel": "3.0.7"
|
|
184
185
|
},
|
|
185
186
|
"devDependencies": {
|
|
@@ -192,7 +193,6 @@
|
|
|
192
193
|
"@aws-sdk/client-lambda": "^3.1045.0",
|
|
193
194
|
"@aws-sdk/client-eventbridge": "^3.1045.0",
|
|
194
195
|
"@middy/core": "^7.5.0",
|
|
195
|
-
"@types/aws-lambda": "^8.10.161",
|
|
196
196
|
"@types/node": "^25.7.0",
|
|
197
197
|
"tsup": "^8.5.1",
|
|
198
198
|
"typescript": "^6.0.3",
|