@odigos/aws-cdk 0.0.16 → 0.0.18

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/.jsii CHANGED
@@ -3887,7 +3887,7 @@
3887
3887
  "abstract": true,
3888
3888
  "docs": {
3889
3889
  "default": "- no headers",
3890
- "remarks": "These are rendered into `OPENTELEMETRY_COLLECTOR_CONFIG_URI`, which is a plain Lambda environment\nvariable: readable by anyone with `lambda:GetFunctionConfiguration` and visible in the console. For a\nlong-lived credential prefer a destination that authenticates by network position, or terminate at a\ncollector you control.\n\nOn ECS Fargate they are rendered into `OTEL_EXPORTER_OTLP_HEADERS` on the instrumented container,\nwith the same exposure — `ecs:DescribeTaskDefinition` and the console. Note that the connector does\nNOT set that variable when it instruments a Fargate task itself, and does not compare it, so this is\nneither reconciled nor reported as drift either way: it is here because an authenticated destination\nis otherwise unreachable from a task, which has no collector of its own to hold the credential.",
3890
+ "remarks": "These are included in compact `ODIGOS_LAMBDA_CONFIG`, which is a plain Lambda environment\nvariable: readable by anyone with `lambda:GetFunctionConfiguration` and visible in the console. For a\nlong-lived credential prefer a destination that authenticates by network position, or terminate at a\ncollector you control.\n\nOn ECS Fargate they are rendered into `OTEL_EXPORTER_OTLP_HEADERS` on the instrumented container,\nwith the same exposure — `ecs:DescribeTaskDefinition` and the console. Note that the connector does\nNOT set that variable when it instruments a Fargate task itself, and does not compare it, so this is\nneither reconciled nor reported as drift either way: it is here because an authenticated destination\nis otherwise unreachable from a task, which has no collector of its own to hold the credential.",
3891
3891
  "stability": "stable",
3892
3892
  "summary": "Per-request headers, in practice the destination's credential."
3893
3893
  },
@@ -3982,6 +3982,25 @@
3982
3982
  "primitive": "boolean"
3983
3983
  }
3984
3984
  },
3985
+ {
3986
+ "abstract": true,
3987
+ "docs": {
3988
+ "default": "false",
3989
+ "remarks": "Current language bundles do not generate OTLP profiles;\nenabling this emits a warning and does not activate a profiler.",
3990
+ "stability": "stable",
3991
+ "summary": "Retains profiling intent."
3992
+ },
3993
+ "immutable": true,
3994
+ "locationInModule": {
3995
+ "filename": "src/types.ts",
3996
+ "line": 244
3997
+ },
3998
+ "name": "profiles",
3999
+ "optional": true,
4000
+ "type": {
4001
+ "primitive": "boolean"
4002
+ }
4003
+ },
3985
4004
  {
3986
4005
  "abstract": true,
3987
4006
  "docs": {
@@ -4019,7 +4038,7 @@
4019
4038
  },
4020
4039
  "locationInModule": {
4021
4040
  "filename": "src/fargate.ts",
4022
- "line": 277
4041
+ "line": 274
4023
4042
  },
4024
4043
  "parameters": [
4025
4044
  {
@@ -4045,7 +4064,7 @@
4045
4064
  "kind": "class",
4046
4065
  "locationInModule": {
4047
4066
  "filename": "src/fargate.ts",
4048
- "line": 271
4067
+ "line": 268
4049
4068
  },
4050
4069
  "methods": [
4051
4070
  {
@@ -4056,7 +4075,7 @@
4056
4075
  },
4057
4076
  "locationInModule": {
4058
4077
  "filename": "src/fargate.ts",
4059
- "line": 303
4078
+ "line": 300
4060
4079
  },
4061
4080
  "name": "instrument",
4062
4081
  "parameters": [
@@ -4075,7 +4094,7 @@
4075
4094
  },
4076
4095
  "locationInModule": {
4077
4096
  "filename": "src/fargate.ts",
4078
- "line": 341
4097
+ "line": 338
4079
4098
  },
4080
4099
  "name": "instrumentAll",
4081
4100
  "parameters": [
@@ -4107,7 +4126,7 @@
4107
4126
  "kind": "interface",
4108
4127
  "locationInModule": {
4109
4128
  "filename": "src/fargate.ts",
4110
- "line": 91
4129
+ "line": 88
4111
4130
  },
4112
4131
  "name": "OdigosFargateInstrumentationOptions",
4113
4132
  "properties": [
@@ -4121,7 +4140,7 @@
4121
4140
  "immutable": true,
4122
4141
  "locationInModule": {
4123
4142
  "filename": "src/fargate.ts",
4124
- "line": 99
4143
+ "line": 96
4125
4144
  },
4126
4145
  "name": "destination",
4127
4146
  "type": {
@@ -4139,7 +4158,7 @@
4139
4158
  "immutable": true,
4140
4159
  "locationInModule": {
4141
4160
  "filename": "src/fargate.ts",
4142
- "line": 117
4161
+ "line": 114
4143
4162
  },
4144
4163
  "name": "agentsImage",
4145
4164
  "optional": true,
@@ -4158,7 +4177,7 @@
4158
4177
  "immutable": true,
4159
4178
  "locationInModule": {
4160
4179
  "filename": "src/fargate.ts",
4161
- "line": 128
4180
+ "line": 125
4162
4181
  },
4163
4182
  "name": "debug",
4164
4183
  "optional": true,
@@ -4183,7 +4202,7 @@
4183
4202
  "kind": "interface",
4184
4203
  "locationInModule": {
4185
4204
  "filename": "src/fargate.ts",
4186
- "line": 201
4205
+ "line": 198
4187
4206
  },
4188
4207
  "name": "OdigosFargateInstrumentationProps",
4189
4208
  "properties": [
@@ -4198,7 +4217,7 @@
4198
4217
  "immutable": true,
4199
4218
  "locationInModule": {
4200
4219
  "filename": "src/fargate.ts",
4201
- "line": 207
4220
+ "line": 204
4202
4221
  },
4203
4222
  "name": "targets",
4204
4223
  "optional": true,
@@ -4289,7 +4308,7 @@
4289
4308
  "kind": "interface",
4290
4309
  "locationInModule": {
4291
4310
  "filename": "src/fargate.ts",
4292
- "line": 134
4311
+ "line": 131
4293
4312
  },
4294
4313
  "name": "OdigosFargateTarget",
4295
4314
  "properties": [
@@ -4303,7 +4322,7 @@
4303
4322
  "immutable": true,
4304
4323
  "locationInModule": {
4305
4324
  "filename": "src/fargate.ts",
4306
- "line": 139
4325
+ "line": 136
4307
4326
  },
4308
4327
  "name": "container",
4309
4328
  "type": {
@@ -4320,7 +4339,7 @@
4320
4339
  "immutable": true,
4321
4340
  "locationInModule": {
4322
4341
  "filename": "src/fargate.ts",
4323
- "line": 147
4342
+ "line": 144
4324
4343
  },
4325
4344
  "name": "language",
4326
4345
  "type": {
@@ -4338,7 +4357,7 @@
4338
4357
  "immutable": true,
4339
4358
  "locationInModule": {
4340
4359
  "filename": "src/fargate.ts",
4341
- "line": 195
4360
+ "line": 192
4342
4361
  },
4343
4362
  "name": "existingLoaderValue",
4344
4363
  "optional": true,
@@ -4357,7 +4376,7 @@
4357
4376
  "immutable": true,
4358
4377
  "locationInModule": {
4359
4378
  "filename": "src/fargate.ts",
4360
- "line": 182
4379
+ "line": 179
4361
4380
  },
4362
4381
  "name": "runtimeVersion",
4363
4382
  "optional": true,
@@ -4376,7 +4395,7 @@
4376
4395
  "immutable": true,
4377
4396
  "locationInModule": {
4378
4397
  "filename": "src/fargate.ts",
4379
- "line": 172
4398
+ "line": 169
4380
4399
  },
4381
4400
  "name": "service",
4382
4401
  "optional": true,
@@ -4395,7 +4414,7 @@
4395
4414
  "immutable": true,
4396
4415
  "locationInModule": {
4397
4416
  "filename": "src/fargate.ts",
4398
- "line": 161
4417
+ "line": 158
4399
4418
  },
4400
4419
  "name": "serviceName",
4401
4420
  "optional": true,
@@ -4420,7 +4439,7 @@
4420
4439
  },
4421
4440
  "locationInModule": {
4422
4441
  "filename": "src/instrumentation.ts",
4423
- "line": 386
4442
+ "line": 385
4424
4443
  },
4425
4444
  "parameters": [
4426
4445
  {
@@ -4447,7 +4466,7 @@
4447
4466
  "kind": "class",
4448
4467
  "locationInModule": {
4449
4468
  "filename": "src/instrumentation.ts",
4450
- "line": 378
4469
+ "line": 377
4451
4470
  },
4452
4471
  "methods": [
4453
4472
  {
@@ -4457,7 +4476,7 @@
4457
4476
  },
4458
4477
  "locationInModule": {
4459
4478
  "filename": "src/instrumentation.ts",
4460
- "line": 393
4479
+ "line": 392
4461
4480
  },
4462
4481
  "name": "visit",
4463
4482
  "overrides": "aws-cdk-lib.IAspect",
@@ -4488,7 +4507,7 @@
4488
4507
  "kind": "interface",
4489
4508
  "locationInModule": {
4490
4509
  "filename": "src/instrumentation.ts",
4491
- "line": 359
4510
+ "line": 358
4492
4511
  },
4493
4512
  "name": "OdigosInstrumentationAspectProps",
4494
4513
  "symbolId": "src/instrumentation:OdigosInstrumentationAspectProps"
@@ -4538,7 +4557,7 @@
4538
4557
  "kind": "interface",
4539
4558
  "locationInModule": {
4540
4559
  "filename": "src/instrumentation.ts",
4541
- "line": 85
4560
+ "line": 54
4542
4561
  },
4543
4562
  "name": "OdigosInstrumentationOptions",
4544
4563
  "properties": [
@@ -4551,13 +4570,32 @@
4551
4570
  "immutable": true,
4552
4571
  "locationInModule": {
4553
4572
  "filename": "src/instrumentation.ts",
4554
- "line": 89
4573
+ "line": 58
4555
4574
  },
4556
4575
  "name": "destination",
4557
4576
  "type": {
4558
4577
  "fqn": "@odigos/aws-cdk.OdigosDestination"
4559
4578
  }
4560
4579
  },
4580
+ {
4581
+ "abstract": true,
4582
+ "docs": {
4583
+ "default": "- resolved from layerSource for ADOT",
4584
+ "remarks": "Upstream SDK layers already include their collector and do not use this option.",
4585
+ "stability": "stable",
4586
+ "summary": "Architecture-matched collector layer when supplying a custom ADOT SDK layer."
4587
+ },
4588
+ "immutable": true,
4589
+ "locationInModule": {
4590
+ "filename": "src/instrumentation.ts",
4591
+ "line": 132
4592
+ },
4593
+ "name": "collectorLayerVersion",
4594
+ "optional": true,
4595
+ "type": {
4596
+ "fqn": "aws-cdk-lib.aws_lambda.ILayerVersion"
4597
+ }
4598
+ },
4561
4599
  {
4562
4600
  "abstract": true,
4563
4601
  "docs": {
@@ -4569,7 +4607,7 @@
4569
4607
  "immutable": true,
4570
4608
  "locationInModule": {
4571
4609
  "filename": "src/instrumentation.ts",
4572
- "line": 141
4610
+ "line": 115
4573
4611
  },
4574
4612
  "name": "debug",
4575
4613
  "optional": true,
@@ -4577,6 +4615,24 @@
4577
4615
  "primitive": "boolean"
4578
4616
  }
4579
4617
  },
4618
+ {
4619
+ "abstract": true,
4620
+ "docs": {
4621
+ "default": "- the bundled default distribution for the function's runtime",
4622
+ "stability": "stable",
4623
+ "summary": "Connector GraphQL distro name, such as java-lambda-otel-agent or java-lambda-otel-wrapper."
4624
+ },
4625
+ "immutable": true,
4626
+ "locationInModule": {
4627
+ "filename": "src/instrumentation.ts",
4628
+ "line": 82
4629
+ },
4630
+ "name": "distro",
4631
+ "optional": true,
4632
+ "type": {
4633
+ "primitive": "string"
4634
+ }
4635
+ },
4580
4636
  {
4581
4637
  "abstract": true,
4582
4638
  "docs": {
@@ -4588,7 +4644,7 @@
4588
4644
  "immutable": true,
4589
4645
  "locationInModule": {
4590
4646
  "filename": "src/instrumentation.ts",
4591
- "line": 163
4647
+ "line": 144
4592
4648
  },
4593
4649
  "name": "existingLoaderValue",
4594
4650
  "optional": true,
@@ -4599,15 +4655,14 @@
4599
4655
  {
4600
4656
  "abstract": true,
4601
4657
  "docs": {
4602
- "default": "OdigosJavaHandlerDistro.OTEL_HANDLER",
4603
- "remarks": "Ignored for other languages.",
4604
- "stability": "stable",
4605
- "summary": "Which of the Java layer's four wrapper scripts to use."
4658
+ "deprecated": "Use the corresponding java-lambda-otel-*-wrapper distro.",
4659
+ "stability": "deprecated",
4660
+ "summary": "Legacy lightweight Java handler adapter."
4606
4661
  },
4607
4662
  "immutable": true,
4608
4663
  "locationInModule": {
4609
4664
  "filename": "src/instrumentation.ts",
4610
- "line": 114
4665
+ "line": 88
4611
4666
  },
4612
4667
  "name": "javaHandlerDistro",
4613
4668
  "optional": true,
@@ -4625,7 +4680,7 @@
4625
4680
  "immutable": true,
4626
4681
  "locationInModule": {
4627
4682
  "filename": "src/instrumentation.ts",
4628
- "line": 96
4683
+ "line": 65
4629
4684
  },
4630
4685
  "name": "layerSource",
4631
4686
  "optional": true,
@@ -4644,7 +4699,7 @@
4644
4699
  "immutable": true,
4645
4700
  "locationInModule": {
4646
4701
  "filename": "src/instrumentation.ts",
4647
- "line": 151
4702
+ "line": 125
4648
4703
  },
4649
4704
  "name": "layerVersion",
4650
4705
  "optional": true,
@@ -4663,7 +4718,7 @@
4663
4718
  "immutable": true,
4664
4719
  "locationInModule": {
4665
4720
  "filename": "src/instrumentation.ts",
4666
- "line": 107
4721
+ "line": 76
4667
4722
  },
4668
4723
  "name": "mode",
4669
4724
  "optional": true,
@@ -4682,7 +4737,7 @@
4682
4737
  "immutable": true,
4683
4738
  "locationInModule": {
4684
4739
  "filename": "src/instrumentation.ts",
4685
- "line": 129
4740
+ "line": 103
4686
4741
  },
4687
4742
  "name": "serviceName",
4688
4743
  "optional": true,
@@ -4701,7 +4756,7 @@
4701
4756
  "immutable": true,
4702
4757
  "locationInModule": {
4703
4758
  "filename": "src/instrumentation.ts",
4704
- "line": 174
4759
+ "line": 155
4705
4760
  },
4706
4761
  "name": "skipUnsupportedRuntimes",
4707
4762
  "optional": true,
@@ -4763,7 +4818,7 @@
4763
4818
  "assembly": "@odigos/aws-cdk",
4764
4819
  "base": "constructs.Construct",
4765
4820
  "docs": {
4766
- "remarks": "```ts\nconst odigos = new OdigosLambdaInstrumentation(this, 'Odigos', {\n destination: { endpoint: 'otlp.example.com:4317' },\n functions: [apiFn, workerFn],\n});\nodigos.instrument(anotherFn);\n```\n\nWhat it does to each function: attaches the layer for the function's language and architecture, sets\n`AWS_LAMBDA_EXEC_WRAPPER` so the layer loads the SDK, sets `OTEL_SERVICE_NAME`, and hands the in-Lambda\ncollector its entire configuration inline through `OPENTELEMETRY_COLLECTOR_CONFIG_URI`.\n\nThe function's SDK exports to the collector on localhost, not to your destination. The collector\nforwards after the handler has already returned, so a slow destination costs billed duration rather\nthan caller latency.\n\n## Do not also instrument these functions with the connector\n\nThe Odigos AWS connector instruments live functions by mutating them, and reconciles them back to its\nown desired state on every pass. A function instrumented here and also enabled as a connector source\nends up owned by both: each `cdk deploy` reasserts the CDK's environment, each reconcile reasserts the\nconnector's, and every round trip publishes a new function version.\n\nChoose one per function. This construct writes `ODIGOS_IAC` and never the connector's `ODIGOS_MANAGED`\nownership marker, so an IaC-instrumented function reports as instrumented but is not one the connector\nwill roll back — though it will happily take it over if you enable it as a source.",
4821
+ "remarks": "```ts\nconst odigos = new OdigosLambdaInstrumentation(this, 'Odigos', {\n destination: { endpoint: 'otlp.example.com:4317' },\n functions: [apiFn, workerFn],\n});\nodigos.instrument(anotherFn);\n```\n\nWhat it does to each function: attaches the layer for the function's language and architecture, sets\n`AWS_LAMBDA_EXEC_WRAPPER` and compact `ODIGOS_LAMBDA_CONFIG`. The layer builds the SDK environment and\ncollector pipelines at startup; ownership and exact layer attribution are recorded in resource tags.\n\nThe function's SDK exports to the collector on localhost, not to your destination. The collector\nforwards after the handler has already returned, so a slow destination costs billed duration rather\nthan caller latency.\n\n## Do not also instrument these functions with the connector\n\nThe Odigos AWS connector instruments live functions by mutating them, and reconciles them back to its\nown desired state on every pass. A function instrumented here and also enabled as a connector source\nends up owned by both: each `cdk deploy` reasserts the CDK's environment, each reconcile reasserts the\nconnector's, and every round trip publishes a new function version.\n\nChoose one per function. This construct writes `odigos:iac` resource tags and never the connector's `odigos:managed`\nownership tag, so an IaC-instrumented function reports as instrumented but is not one the connector\nwill roll back — though it will happily take it over if you enable it as a source.",
4767
4822
  "stability": "stable",
4768
4823
  "summary": "Instruments AWS Lambda functions with the Odigos OpenTelemetry layer."
4769
4824
  },
@@ -4774,7 +4829,7 @@
4774
4829
  },
4775
4830
  "locationInModule": {
4776
4831
  "filename": "src/instrumentation.ts",
4777
- "line": 225
4832
+ "line": 205
4778
4833
  },
4779
4834
  "parameters": [
4780
4835
  {
@@ -4800,7 +4855,7 @@
4800
4855
  "kind": "class",
4801
4856
  "locationInModule": {
4802
4857
  "filename": "src/instrumentation.ts",
4803
- "line": 219
4858
+ "line": 200
4804
4859
  },
4805
4860
  "methods": [
4806
4861
  {
@@ -4811,7 +4866,7 @@
4811
4866
  },
4812
4867
  "locationInModule": {
4813
4868
  "filename": "src/instrumentation.ts",
4814
- "line": 265
4869
+ "line": 245
4815
4870
  },
4816
4871
  "name": "instrument",
4817
4872
  "parameters": [
@@ -4830,7 +4885,7 @@
4830
4885
  },
4831
4886
  "locationInModule": {
4832
4887
  "filename": "src/instrumentation.ts",
4833
- "line": 298
4888
+ "line": 293
4834
4889
  },
4835
4890
  "name": "instrumentAll",
4836
4891
  "parameters": [
@@ -4865,7 +4920,7 @@
4865
4920
  "kind": "interface",
4866
4921
  "locationInModule": {
4867
4922
  "filename": "src/instrumentation.ts",
4868
- "line": 180
4923
+ "line": 161
4869
4924
  },
4870
4925
  "name": "OdigosLambdaInstrumentationProps",
4871
4926
  "properties": [
@@ -4880,7 +4935,7 @@
4880
4935
  "immutable": true,
4881
4936
  "locationInModule": {
4882
4937
  "filename": "src/instrumentation.ts",
4883
- "line": 186
4938
+ "line": 167
4884
4939
  },
4885
4940
  "name": "functions",
4886
4941
  "optional": true,
@@ -4930,6 +4985,6 @@
4930
4985
  "symbolId": "src/types:OdigosLayerSource"
4931
4986
  }
4932
4987
  },
4933
- "version": "0.0.16",
4934
- "fingerprint": "pvjcSr/Q7i2ERY7MnFXzW6blKkBUD8Km216xADkW2Uk="
4988
+ "version": "0.0.18",
4989
+ "fingerprint": "5/xKYOxxDpKywcwlm/8NYunPMm8n0M9yKWyb2VKFn3Q="
4935
4990
  }
@@ -1,6 +1,6 @@
1
1
  import { OdigosDestination } from './types';
2
2
  /**
3
- * Renders the in-Lambda collector's complete configuration as an inline
3
+ * Renders the legacy in-Lambda collector configuration for validation and parity tests as an inline
4
4
  * `OPENTELEMETRY_COLLECTOR_CONFIG_URI` value.
5
5
  *
6
6
  * This is a PORT of `renderCollectorConfig` in the connector
@@ -59,8 +59,7 @@ export declare function signalEnabled(value: boolean | undefined, defaultEnabled
59
59
  * almost every destination accepts and what almost everyone instruments for; the other two are a
60
60
  * deliberate choice about the destination, so they are made deliberately.
61
61
  *
62
- * Turning one on is `metrics: true`. Enabling a signal also drops the `OTEL_*_EXPORTER=none` override, so
63
- * the SDK starts producing it again.
62
+ * Turning one on is `metrics: true`. Enabling a signal sets `OTEL_*_EXPORTER=otlp` explicitly.
64
63
  */
65
64
  export declare const SIGNAL_DEFAULTS: {
66
65
  traces: boolean;
@@ -79,18 +78,21 @@ export declare function resolvedSignals(dest: OdigosDestination): {
79
78
  * different endpoint grammars, so this is a genuine branch.
80
79
  */
81
80
  export declare function exporterNameFor(dest: OdigosDestination): string;
82
- /**
83
- * Returns the value a signal's `OTEL_*_EXPORTER` must hold: `none` to suppress a signal the destination
84
- * does not accept, or `undefined` meaning the variable must be ABSENT because the SDK's own default is
85
- * already what we want.
86
- *
87
- * Only the "none" side is written, because `otlp` is already every OpenTelemetry SDK's default for all
88
- * three signals — setting it would restate the default in three variables on every function.
89
- */
90
- export declare function exporterOverrideFor(supported: boolean): string | undefined;
81
+ /** Explicit exporter selectors mirror the base connector policy; SDK defaults vary. */
82
+ export declare function exporterOverrideFor(enabled: boolean): string;
83
+ /** Per-signal transport overrides bypass the destination and must not coexist with it. */
84
+ export declare function signalTransportOverrides(): string[];
85
+ /** Language-specific SDK activation, shared by Lambda and Fargate. */
86
+ export declare function signalActivation(language: string, dest: OdigosDestination): {
87
+ [key: string]: string;
88
+ };
91
89
  /**
92
90
  * Renders the complete collector configuration for one destination.
93
91
  *
94
92
  * @throws if the destination names neither transport, both transports, or no signals at all.
95
93
  */
96
94
  export declare function renderCollectorConfig(dest: OdigosDestination): string;
95
+ /** The Lambda Node layer registers only dns/http/net unless explicitly configured. */
96
+ export declare function lambdaSignalActivation(language: string, dest: OdigosDestination): {
97
+ [key: string]: string;
98
+ };