@odigos/aws-cdk 0.0.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/lib/types.d.ts ADDED
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Public option types.
3
+ *
4
+ * Everything here is either a `readonly` struct or an enum. That is a jsii requirement — the package is
5
+ * cross-compiled to Python, and jsii rejects union types, structural interfaces with methods, and
6
+ * overloads — but it is also what keeps the API describable in a table, which matters more for
7
+ * instrumentation options than for most libraries: a wrong value here does not fail at synth, it fails at
8
+ * the instrumented function's next cold start.
9
+ */
10
+ /**
11
+ * Where the Odigos layer attached to a function comes from.
12
+ */
13
+ export declare enum OdigosLayerSource {
14
+ /**
15
+ * Reference the public Odigos layer version published in the stack's region.
16
+ *
17
+ * One line of synthesized template, no extra resources, and the layer is maintained by Odigos. The ARN
18
+ * is resolved at synth time from the manifest baked into this package, so there is no lookup, no custom
19
+ * resource and no deploy-time API call — and a `cdk diff` shows a layer change as an actual diff.
20
+ *
21
+ * The layer is owned by the Odigos AWS account. Organisations whose policy forbids attaching a Lambda
22
+ * layer owned by a foreign account want `IN_ACCOUNT` instead.
23
+ */
24
+ ODIGOS_PUBLIC = "ODIGOS_PUBLIC",
25
+ /**
26
+ * Deploy the Odigos Serverless Application Repository application into this account and attach the
27
+ * layer it creates.
28
+ *
29
+ * Synthesizes an `AWS::Serverless::Application` (a nested stack) per language/architecture actually in
30
+ * use, and wires its `LayerVersionArn` output into the function. The layer ends up in the customer's own
31
+ * account, created by their own stack, from the same bytes as the public one.
32
+ *
33
+ * Costs a nested stack per language/architecture combination and makes the first deploy slower.
34
+ */
35
+ IN_ACCOUNT = "IN_ACCOUNT"
36
+ }
37
+ /**
38
+ * How a function is instrumented.
39
+ *
40
+ * The two modes are genuinely different mechanisms, not levels of detail, and applying the wrong one
41
+ * breaks the function rather than degrading its telemetry.
42
+ */
43
+ export declare enum OdigosInstrumentationMode {
44
+ /**
45
+ * Standard Lambda handler. Sets `AWS_LAMBDA_EXEC_WRAPPER` to the language's wrapper script, which the
46
+ * layer uses to load the OpenTelemetry SDK around the handler invocation.
47
+ *
48
+ * The default, and correct for any function whose entry point is a Lambda handler.
49
+ */
50
+ HANDLER = "HANDLER",
51
+ /**
52
+ * A function running a web server behind the AWS Lambda Web Adapter.
53
+ *
54
+ * The adapter owns `AWS_LAMBDA_EXEC_WRAPPER`, so this mode does not touch it. Instrumentation is loaded
55
+ * through the language's own loader variable instead — `JAVA_TOOL_OPTIONS`, `NODE_OPTIONS` or
56
+ * `PYTHONPATH` — appended to (never replacing) whatever the function already sets.
57
+ *
58
+ * Setting `HANDLER` on a web-adapter function overwrites the adapter's wrapper and the function stops
59
+ * serving. Ruby has no verified web-server loader and is rejected at synth in this mode.
60
+ */
61
+ WEB_SERVER = "WEB_SERVER"
62
+ }
63
+ /**
64
+ * Which of the Java layer's four wrapper scripts to use.
65
+ *
66
+ * Only consulted for Java: every other language's layer ships exactly one wrapper, so an override there
67
+ * would be a choice between one option.
68
+ *
69
+ * Picking the wrong one is not a matter of richer or poorer spans. `OTEL_HANDLER` installs
70
+ * `TracingRequestWrapper`, which implements `RequestHandler`; a function implementing
71
+ * `RequestStreamHandler` has a different signature entirely, so wrapping it that way breaks the
72
+ * invocation.
73
+ */
74
+ export declare enum OdigosJavaHandlerDistro {
75
+ /** `/opt/otel-handler` — a `RequestHandler` function. The default. */
76
+ OTEL_HANDLER = "OTEL_HANDLER",
77
+ /** `/opt/otel-proxy-handler` — enriched wrapper for API Gateway proxy events. */
78
+ OTEL_PROXY_HANDLER = "OTEL_PROXY_HANDLER",
79
+ /** `/opt/otel-sqs-handler` — enriched wrapper for SQS events. */
80
+ OTEL_SQS_HANDLER = "OTEL_SQS_HANDLER",
81
+ /** `/opt/otel-stream-handler` — a `RequestStreamHandler` function. */
82
+ OTEL_STREAM_HANDLER = "OTEL_STREAM_HANDLER"
83
+ }
84
+ /**
85
+ * Where the in-Lambda collector exports telemetry to.
86
+ *
87
+ * Exactly one of `endpoint` (OTLP/gRPC) and `httpEndpoint` (OTLP/HTTP) must be set. They are different
88
+ * collector components with different endpoint grammars — `host:port` versus a scheme-qualified URL — so
89
+ * this is a genuine branch and not a formatting difference. Setting neither, or both, throws at synth.
90
+ *
91
+ * NOTE ON THE DATA PATH. The function's SDK does not export here. It exports to the collector running
92
+ * inside the same Lambda sandbox on localhost, and the collector forwards to this destination after the
93
+ * handler has already returned its response. That indirection is the point: a slow or unreachable
94
+ * destination costs billed duration, not caller latency.
95
+ */
96
+ export interface OdigosDestination {
97
+ /**
98
+ * OTLP/gRPC destination as `host:port`, e.g. `otlp.example.com:4317`.
99
+ *
100
+ * No scheme. A URL here produces a collector that fails to build its exporter and exits, leaving the
101
+ * function instrumented and silent.
102
+ *
103
+ * @default - none; `httpEndpoint` must be set instead
104
+ */
105
+ readonly endpoint?: string;
106
+ /**
107
+ * OTLP/HTTP destination as a full URL, e.g. `https://otlp.example.com:4318`.
108
+ *
109
+ * @default - none; `endpoint` must be set instead
110
+ */
111
+ readonly httpEndpoint?: string;
112
+ /**
113
+ * Disable TLS verification on the gRPC exporter.
114
+ *
115
+ * Applies to `endpoint` only — the HTTP exporter takes its transport from the URL scheme.
116
+ *
117
+ * @default false
118
+ */
119
+ readonly insecure?: boolean;
120
+ /**
121
+ * Per-request headers, in practice the destination's credential.
122
+ *
123
+ * These are rendered into `OPENTELEMETRY_COLLECTOR_CONFIG_URI`, which is a plain Lambda environment
124
+ * variable: readable by anyone with `lambda:GetFunctionConfiguration` and visible in the console. For a
125
+ * long-lived credential prefer a destination that authenticates by network position, or terminate at a
126
+ * collector you control.
127
+ *
128
+ * @default - no headers
129
+ */
130
+ readonly headers?: {
131
+ [key: string]: string;
132
+ };
133
+ /**
134
+ * Send traces.
135
+ *
136
+ * A signal that is off gets no collector pipeline AND the SDK is told not to produce it
137
+ * (`OTEL_TRACES_EXPORTER=none`). Both halves matter: a signal with no pipeline is refused at the
138
+ * receiver on every batch, so suppressing it at the source is what stops the error loop.
139
+ *
140
+ * @default true
141
+ */
142
+ readonly traces?: boolean;
143
+ /**
144
+ * Send metrics.
145
+ *
146
+ * @default true
147
+ */
148
+ readonly metrics?: boolean;
149
+ /**
150
+ * Send logs.
151
+ *
152
+ * @default true
153
+ */
154
+ readonly logs?: boolean;
155
+ }
package/lib/types.js ADDED
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ /**
3
+ * Public option types.
4
+ *
5
+ * Everything here is either a `readonly` struct or an enum. That is a jsii requirement — the package is
6
+ * cross-compiled to Python, and jsii rejects union types, structural interfaces with methods, and
7
+ * overloads — but it is also what keeps the API describable in a table, which matters more for
8
+ * instrumentation options than for most libraries: a wrong value here does not fail at synth, it fails at
9
+ * the instrumented function's next cold start.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.OdigosJavaHandlerDistro = exports.OdigosInstrumentationMode = exports.OdigosLayerSource = void 0;
13
+ /**
14
+ * Where the Odigos layer attached to a function comes from.
15
+ */
16
+ var OdigosLayerSource;
17
+ (function (OdigosLayerSource) {
18
+ /**
19
+ * Reference the public Odigos layer version published in the stack's region.
20
+ *
21
+ * One line of synthesized template, no extra resources, and the layer is maintained by Odigos. The ARN
22
+ * is resolved at synth time from the manifest baked into this package, so there is no lookup, no custom
23
+ * resource and no deploy-time API call — and a `cdk diff` shows a layer change as an actual diff.
24
+ *
25
+ * The layer is owned by the Odigos AWS account. Organisations whose policy forbids attaching a Lambda
26
+ * layer owned by a foreign account want `IN_ACCOUNT` instead.
27
+ */
28
+ OdigosLayerSource["ODIGOS_PUBLIC"] = "ODIGOS_PUBLIC";
29
+ /**
30
+ * Deploy the Odigos Serverless Application Repository application into this account and attach the
31
+ * layer it creates.
32
+ *
33
+ * Synthesizes an `AWS::Serverless::Application` (a nested stack) per language/architecture actually in
34
+ * use, and wires its `LayerVersionArn` output into the function. The layer ends up in the customer's own
35
+ * account, created by their own stack, from the same bytes as the public one.
36
+ *
37
+ * Costs a nested stack per language/architecture combination and makes the first deploy slower.
38
+ */
39
+ OdigosLayerSource["IN_ACCOUNT"] = "IN_ACCOUNT";
40
+ })(OdigosLayerSource || (exports.OdigosLayerSource = OdigosLayerSource = {}));
41
+ /**
42
+ * How a function is instrumented.
43
+ *
44
+ * The two modes are genuinely different mechanisms, not levels of detail, and applying the wrong one
45
+ * breaks the function rather than degrading its telemetry.
46
+ */
47
+ var OdigosInstrumentationMode;
48
+ (function (OdigosInstrumentationMode) {
49
+ /**
50
+ * Standard Lambda handler. Sets `AWS_LAMBDA_EXEC_WRAPPER` to the language's wrapper script, which the
51
+ * layer uses to load the OpenTelemetry SDK around the handler invocation.
52
+ *
53
+ * The default, and correct for any function whose entry point is a Lambda handler.
54
+ */
55
+ OdigosInstrumentationMode["HANDLER"] = "HANDLER";
56
+ /**
57
+ * A function running a web server behind the AWS Lambda Web Adapter.
58
+ *
59
+ * The adapter owns `AWS_LAMBDA_EXEC_WRAPPER`, so this mode does not touch it. Instrumentation is loaded
60
+ * through the language's own loader variable instead — `JAVA_TOOL_OPTIONS`, `NODE_OPTIONS` or
61
+ * `PYTHONPATH` — appended to (never replacing) whatever the function already sets.
62
+ *
63
+ * Setting `HANDLER` on a web-adapter function overwrites the adapter's wrapper and the function stops
64
+ * serving. Ruby has no verified web-server loader and is rejected at synth in this mode.
65
+ */
66
+ OdigosInstrumentationMode["WEB_SERVER"] = "WEB_SERVER";
67
+ })(OdigosInstrumentationMode || (exports.OdigosInstrumentationMode = OdigosInstrumentationMode = {}));
68
+ /**
69
+ * Which of the Java layer's four wrapper scripts to use.
70
+ *
71
+ * Only consulted for Java: every other language's layer ships exactly one wrapper, so an override there
72
+ * would be a choice between one option.
73
+ *
74
+ * Picking the wrong one is not a matter of richer or poorer spans. `OTEL_HANDLER` installs
75
+ * `TracingRequestWrapper`, which implements `RequestHandler`; a function implementing
76
+ * `RequestStreamHandler` has a different signature entirely, so wrapping it that way breaks the
77
+ * invocation.
78
+ */
79
+ var OdigosJavaHandlerDistro;
80
+ (function (OdigosJavaHandlerDistro) {
81
+ /** `/opt/otel-handler` — a `RequestHandler` function. The default. */
82
+ OdigosJavaHandlerDistro["OTEL_HANDLER"] = "OTEL_HANDLER";
83
+ /** `/opt/otel-proxy-handler` — enriched wrapper for API Gateway proxy events. */
84
+ OdigosJavaHandlerDistro["OTEL_PROXY_HANDLER"] = "OTEL_PROXY_HANDLER";
85
+ /** `/opt/otel-sqs-handler` — enriched wrapper for SQS events. */
86
+ OdigosJavaHandlerDistro["OTEL_SQS_HANDLER"] = "OTEL_SQS_HANDLER";
87
+ /** `/opt/otel-stream-handler` — a `RequestStreamHandler` function. */
88
+ OdigosJavaHandlerDistro["OTEL_STREAM_HANDLER"] = "OTEL_STREAM_HANDLER";
89
+ })(OdigosJavaHandlerDistro || (exports.OdigosJavaHandlerDistro = OdigosJavaHandlerDistro = {}));
90
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7OztHQVFHOzs7QUFFSDs7R0FFRztBQUNILElBQVksaUJBd0JYO0FBeEJELFdBQVksaUJBQWlCO0lBQzNCOzs7Ozs7Ozs7T0FTRztJQUNILG9EQUErQixDQUFBO0lBRS9COzs7Ozs7Ozs7T0FTRztJQUNILDhDQUF5QixDQUFBO0FBQzNCLENBQUMsRUF4QlcsaUJBQWlCLGlDQUFqQixpQkFBaUIsUUF3QjVCO0FBRUQ7Ozs7O0dBS0c7QUFDSCxJQUFZLHlCQW9CWDtBQXBCRCxXQUFZLHlCQUF5QjtJQUNuQzs7Ozs7T0FLRztJQUNILGdEQUFtQixDQUFBO0lBRW5COzs7Ozs7Ozs7T0FTRztJQUNILHNEQUF5QixDQUFBO0FBQzNCLENBQUMsRUFwQlcseUJBQXlCLHlDQUF6Qix5QkFBeUIsUUF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nXTogc3RyaW5nIH07XG5cbiAgLyoqXG4gICAqIFNlbmQgdHJhY2VzLlxuICAgKlxuICAgKiBBIHNpZ25hbCB0aGF0IGlzIG9mZiBnZXRzIG5vIGNvbGxlY3RvciBwaXBlbGluZSBBTkQgdGhlIFNESyBpcyB0b2xkIG5vdCB0byBwcm9kdWNlIGl0XG4gICAqIChgT1RFTF9UUkFDRVNfRVhQT1JURVI9bm9uZWApLiBCb3RoIGhhbHZlcyBtYXR0ZXI6IGEgc2lnbmFsIHdpdGggbm8gcGlwZWxpbmUgaXMgcmVmdXNlZCBhdCB0aGVcbiAgICogcmVjZWl2ZXIgb24gZXZlcnkgYmF0Y2gsIHNvIHN1cHByZXNzaW5nIGl0IGF0IHRoZSBzb3VyY2UgaXMgd2hhdCBzdG9wcyB0aGUgZXJyb3IgbG9vcC5cbiAgICpcbiAgICogQGRlZmF1bHQgdHJ1ZVxuICAgKi9cbiAgcmVhZG9ubHkgdHJhY2VzPzogYm9vbGVhbjtcblxuICAvKipcbiAgICogU2VuZCBtZXRyaWNzLlxuICAgKlxuICAgKiBAZGVmYXVsdCB0cnVlXG4gICAqL1xuICByZWFkb25seSBtZXRyaWNzPzogYm9vbGVhbjtcblxuICAvKipcbiAgICogU2VuZCBsb2dzLlxuICAgKlxuICAgKiBAZGVmYXVsdCB0cnVlXG4gICAqL1xuICByZWFkb25seSBsb2dzPzogYm9vbGVhbjtcbn1cbiJdfQ==
package/package.json ADDED
@@ -0,0 +1,115 @@
1
+ {
2
+ "name": "@odigos/aws-cdk",
3
+ "version": "0.0.0",
4
+ "description": "CDK constructs that instrument AWS Lambda functions with the Odigos OpenTelemetry layer",
5
+ "license": "Apache-2.0",
6
+ "author": {
7
+ "name": "Odigos",
8
+ "url": "https://odigos.io",
9
+ "organization": true
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/odigos-io/aws-connector-artifacts.git",
14
+ "directory": "cdk"
15
+ },
16
+ "homepage": "https://github.com/odigos-io/aws-connector-artifacts/tree/main/cdk",
17
+ "keywords": [
18
+ "cdk",
19
+ "aws-cdk",
20
+ "lambda",
21
+ "opentelemetry",
22
+ "odigos",
23
+ "observability",
24
+ "tracing"
25
+ ],
26
+ "main": "lib/index.js",
27
+ "types": "lib/index.d.ts",
28
+ "stability": "stable",
29
+ "$comment": [
30
+ "version is 0.0.0 in the repository and is stamped by the release workflow. A committed version",
31
+ "would be a second place the release number lives, and the one that goes stale.",
32
+ "",
33
+ "jsii cross-compiles the TypeScript to Python. That constrains the public API \u2014 no union types, no",
34
+ "structural interfaces with methods, no overloads, every exported member explicitly typed \u2014 which is",
35
+ "why the props below are plain readonly structs and every variant is an enum rather than a union."
36
+ ],
37
+ "jsii": {
38
+ "outdir": "dist",
39
+ "versionFormat": "short",
40
+ "targets": {
41
+ "python": {
42
+ "distName": "odigos-aws-cdk",
43
+ "module": "odigos_aws_cdk",
44
+ "classifiers": [
45
+ "Framework :: AWS CDK",
46
+ "Framework :: AWS CDK :: 2"
47
+ ]
48
+ }
49
+ },
50
+ "tsc": {
51
+ "outDir": "lib",
52
+ "rootDir": "src"
53
+ },
54
+ "excludeTypescript": [
55
+ "test",
56
+ "scripts"
57
+ ]
58
+ },
59
+ "scripts": {
60
+ "generate": "ts-node --project tsconfig.dev.json scripts/generate-layers.ts",
61
+ "build": "npm run generate && jsii --silence-warnings=reserved-word",
62
+ "watch": "jsii -w",
63
+ "package": "jsii-pacmak",
64
+ "docgen": "jsii-docgen",
65
+ "test": "jest",
66
+ "lint": "eslint --ext .ts src test scripts"
67
+ },
68
+ "peerDependencies": {
69
+ "aws-cdk-lib": "^2.150.0",
70
+ "constructs": "^10.0.5"
71
+ },
72
+ "devDependencies": {
73
+ "@types/jest": "^29.5.12",
74
+ "@types/node": "^20.14.0",
75
+ "@typescript-eslint/eslint-plugin": "^7.13.0",
76
+ "@typescript-eslint/parser": "^7.13.0",
77
+ "aws-cdk-lib": "2.150.0",
78
+ "constructs": "10.0.5",
79
+ "eslint": "^8.57.0",
80
+ "jest": "^29.7.0",
81
+ "jsii": "^5.4.0",
82
+ "jsii-docgen": "^10.4.0",
83
+ "jsii-pacmak": "^1.101.0",
84
+ "ts-jest": "^29.1.5",
85
+ "ts-node": "^10.9.2",
86
+ "typescript": "~5.4.5"
87
+ },
88
+ "engines": {
89
+ "node": ">= 18.12.0"
90
+ },
91
+ "files": [
92
+ "lib",
93
+ ".jsii",
94
+ "README.md"
95
+ ],
96
+ "jest": {
97
+ "preset": "ts-jest",
98
+ "testEnvironment": "node",
99
+ "testMatch": [
100
+ "<rootDir>/test/**/*.test.ts"
101
+ ],
102
+ "$comment": "ts-jest is pinned to tsconfig.dev.json. Left to itself it picks up the tsconfig.json jsii GENERATES on every build, whose rootDir excludes test/ - so `npm run build && npm test`, which is exactly the CI order, fails to transform any test file.",
103
+ "transform": {
104
+ "^.+\\.tsx?$": [
105
+ "ts-jest",
106
+ {
107
+ "tsconfig": "tsconfig.dev.json"
108
+ }
109
+ ]
110
+ }
111
+ },
112
+ "publishConfig": {
113
+ "access": "public"
114
+ }
115
+ }