Skip to content

Commit 29de79a

Browse files
jmsundarclaude
andcommitted
fix: address PR #8 review comments
- extend/README.md: split consumer-contract table into collector env vars vs per-request OTLP headers; move ARIZE_PROJECT_NAME to headers (no collector default); note ARIZE_S3_BUCKET_NAME applies to s3 variant only - publish-extend-otel-layer.yml: size-check the merged layer.zip against Lambda's 50MB zipped limit after the collector+nodejs merge step - UPSTREAM.md: "three places" -> "four places" to match the four bullets - collector/lambdacomponents/exporter: rename logging.go -> debug.go and update build tag to lambdacomponents.exporter.debug - collector configs: declare tls.insecure: false on otlp/coralogix and otlp/arize exporters to document intent at the security boundary - cx-wrapper + layer package.json: bump exporter-*-otlp-proto, instrumentation-grpc, instrumentation-http to 0.214.0 so the whole @opentelemetry/* experimental cohort is on one version - publish-sandbox.sh: add --description with cx-contrib SHA + build time to aws lambda publish-layer-version for easier sandbox triage Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0d4428f commit 29de79a

9 files changed

Lines changed: 41 additions & 15 deletions

File tree

.github/workflows/publish-extend-otel-layer.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ jobs:
8484
unzip -o dl/collector/opentelemetry-collector-layer-${{ matrix.architecture }}.zip -d out/
8585
unzip -o dl/nodejs/layer.zip -d out/
8686
(cd out && zip -r ../layer.zip .)
87+
# Lambda hard limit is 50MB zipped; the merged artifact (collector + nodejs)
88+
# is what actually gets published, so size-check here rather than only on
89+
# the pre-merge nodejs zip in build-nodejs.
90+
- env:
91+
FILE_PATH: ./layer.zip
92+
MAX_SIZE: 52428800
93+
run: ./scripts/check_size.sh
8794
- name: Publish layer version
8895
env:
8996
AWS_REGION: ${{ matrix.region }}

UPSTREAM.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ git fetch origin
6060
git log 3a9691a699ddd06c3644eec70bf4b50cc4217ba3..origin/coralogix-autoinstrumentation --oneline
6161
```
6262

63-
After pulling changes, bump the matching row in the fork-points table. When bumping the cx-contrib SHA specifically, update **three** places in sync:
63+
After pulling changes, bump the matching row in the fork-points table. When bumping the cx-contrib SHA specifically, update **four** places in sync:
6464

6565
- `scripts/publish-sandbox.sh``CX_CONTRIB_SHA`
6666
- `scripts/build-nodejs.sh``CX_CONTRIB_SHA`

collector/lambdacomponents/exporter/logging.go renamed to collector/lambdacomponents/exporter/debug.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build lambdacomponents.custom && (lambdacomponents.all || lambdacomponents.exporter.all || lambdacomponents.exporter.logging)
1+
//go:build lambdacomponents.custom && (lambdacomponents.all || lambdacomponents.exporter.all || lambdacomponents.exporter.debug)
22

33
// Copyright The OpenTelemetry Authors
44
//

extend/README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,29 @@ The collector config is selected via the `OPENTELEMETRY_COLLECTOR_CONFIG_URI` en
2727

2828
## Consumer contract (via `extend-cdk-lib` NodeLambdaBuilder)
2929

30-
Required env vars:
30+
### Collector env vars (set by CDK on the Lambda)
3131

3232
| Var | Source | Purpose |
3333
|-----|--------|---------|
3434
| `CX_SECRET` | existing | CX API key — Secrets Manager name or ARN |
3535
| `CX_APPLICATION` | existing | CX application tag |
3636
| `CX_SUBSYSTEM` | existing | CX subsystem tag |
37-
| `ARIZE_API_KEY_SECRET` | new | Arize OTel API key — Secrets Manager name or ARN |
38-
| `ARIZE_SPACE_ID` | new | Arize space ID (Relay global ID) |
39-
| `ARIZE_PROJECT_NAME` | new | Arize project name |
40-
| `ARIZE_S3_BUCKET_NAME` | new | S3 bucket for archival |
37+
| `ARIZE_API_KEY_SECRET` | new | Arize OTel API key — Secrets Manager name or ARN (collector-side fallback when inbound `api_key` header is absent) |
38+
| `ARIZE_SPACE_ID` | new | Arize space ID (Relay global ID) (collector-side fallback when inbound `space_id` header is absent) |
39+
| `ARIZE_S3_BUCKET_NAME` | new | S3 bucket for archival — **only required for the `cx-arize-s3` variant** |
4140
| `CX_ENDPOINT` | optional | default `ingress.us2.coralogix.com:443` (unified ingress) |
4241
| `ARIZE_COLLECTOR_ENDPOINT` | optional | default `otlp.arize.com:443` (gRPC) |
42+
| `ARIZE_S3_PREFIX` | optional (s3 variant) | default `traces/${CX_APPLICATION}/${CX_SUBSYSTEM}` |
43+
44+
### Per-request OTLP headers (set by Lambda code on the OTLP exporter)
45+
46+
Mastra AI spans are emitted on `localhost:4319` (gRPC) / `localhost:4320` (HTTP) with these headers. The collector's `headers_setter` extension forwards them upstream to Arize.
47+
48+
| Header | Purpose |
49+
|--------|---------|
50+
| `api_key` | Arize OTel API key (overrides `ARIZE_API_KEY_SECRET` fallback) |
51+
| `space_id` | Arize space ID (overrides `ARIZE_SPACE_ID` fallback) |
52+
| `project_name` | Arize project name — **no collector-side default**; consumers register N projects per service so one env var can't serve N |
4353

4454
## Build (pending workflow setup)
4555

extend/collector-config-cx-arize-s3.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ exporters:
7676
# Coralogix — unified OTLP gRPC ingress endpoint (traces, metrics, logs)
7777
otlp/coralogix:
7878
endpoint: ${env:CX_ENDPOINT:-ingress.us2.coralogix.com:443}
79+
tls:
80+
insecure: false
7981
headers:
8082
Authorization: Bearer ${secretsmanager:${env:CX_SECRET}}
8183
CX-Application-Name: ${env:CX_APPLICATION}
@@ -86,6 +88,8 @@ exporters:
8688
# headers_setter supplies api_key / space_id / project_name per request.
8789
otlp/arize:
8890
endpoint: ${env:ARIZE_COLLECTOR_ENDPOINT:-otlp.arize.com:443}
91+
tls:
92+
insecure: false
8993
auth:
9094
authenticator: headers_setter
9195

extend/collector-config-cx-arize.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ exporters:
6868
# Coralogix — unified OTLP gRPC ingress endpoint (traces, metrics, logs)
6969
otlp/coralogix:
7070
endpoint: ${env:CX_ENDPOINT:-ingress.us2.coralogix.com:443}
71+
tls:
72+
insecure: false
7173
headers:
7274
Authorization: Bearer ${secretsmanager:${env:CX_SECRET}}
7375
CX-Application-Name: ${env:CX_APPLICATION}
@@ -78,6 +80,8 @@ exporters:
7880
# headers_setter supplies api_key / space_id / project_name per request.
7981
otlp/arize:
8082
endpoint: ${env:ARIZE_COLLECTOR_ENDPOINT:-otlp.arize.com:443}
83+
tls:
84+
insecure: false
8185
auth:
8286
authenticator: headers_setter
8387

nodejs/packages/cx-wrapper/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@
3333
"@opentelemetry/api": "1.9.0",
3434
"@opentelemetry/auto-configuration-propagators": "0.3.3",
3535
"@opentelemetry/core": "2.6.0",
36-
"@opentelemetry/exporter-metrics-otlp-proto": "0.213.0",
37-
"@opentelemetry/exporter-trace-otlp-proto": "0.213.0",
36+
"@opentelemetry/exporter-metrics-otlp-proto": "0.214.0",
37+
"@opentelemetry/exporter-trace-otlp-proto": "0.214.0",
3838
"@opentelemetry/instrumentation": "0.214.0",
3939
"@opentelemetry/instrumentation-aws-lambda": "file:../../../opentelemetry-js-contrib-cx/packages/instrumentation-aws-lambda/opentelemetry-instrumentation-aws-lambda-0.65.0.tgz",
4040
"@opentelemetry/instrumentation-aws-sdk": "file:../../../opentelemetry-js-contrib-cx/packages/instrumentation-aws-sdk/opentelemetry-instrumentation-aws-sdk-0.68.0.tgz",
4141
"@opentelemetry/instrumentation-dns": "0.56.0",
4242
"@opentelemetry/instrumentation-express": "0.61.0",
4343
"@opentelemetry/instrumentation-graphql": "0.61.0",
44-
"@opentelemetry/instrumentation-grpc": "0.213.0",
44+
"@opentelemetry/instrumentation-grpc": "0.214.0",
4545
"@opentelemetry/instrumentation-hapi": "0.59.0",
46-
"@opentelemetry/instrumentation-http": "0.213.0",
46+
"@opentelemetry/instrumentation-http": "0.214.0",
4747
"@opentelemetry/instrumentation-ioredis": "0.61.0",
4848
"@opentelemetry/instrumentation-koa": "0.61.0",
4949
"@opentelemetry/instrumentation-mongodb": "file:../../../opentelemetry-js-contrib-cx/packages/instrumentation-mongodb/opentelemetry-instrumentation-mongodb-0.66.0.tgz",

nodejs/packages/layer/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@
2929
"@opentelemetry/api": "1.9.0",
3030
"@opentelemetry/auto-configuration-propagators": "0.3.3",
3131
"@opentelemetry/core": "2.6.0",
32-
"@opentelemetry/exporter-metrics-otlp-proto": "0.213.0",
33-
"@opentelemetry/exporter-trace-otlp-proto": "0.213.0",
32+
"@opentelemetry/exporter-metrics-otlp-proto": "0.214.0",
33+
"@opentelemetry/exporter-trace-otlp-proto": "0.214.0",
3434
"@opentelemetry/instrumentation": "0.214.0",
3535
"@opentelemetry/instrumentation-aws-lambda": "file:../../../opentelemetry-js-contrib-cx/packages/instrumentation-aws-lambda/opentelemetry-instrumentation-aws-lambda-0.65.0.tgz",
3636
"@opentelemetry/instrumentation-aws-sdk": "file:../../../opentelemetry-js-contrib-cx/packages/instrumentation-aws-sdk/opentelemetry-instrumentation-aws-sdk-0.68.0.tgz",
3737
"@opentelemetry/instrumentation-dns": "0.56.0",
3838
"@opentelemetry/instrumentation-express": "0.61.0",
3939
"@opentelemetry/instrumentation-graphql": "0.61.0",
40-
"@opentelemetry/instrumentation-grpc": "0.213.0",
40+
"@opentelemetry/instrumentation-grpc": "0.214.0",
4141
"@opentelemetry/instrumentation-hapi": "0.59.0",
42-
"@opentelemetry/instrumentation-http": "0.213.0",
42+
"@opentelemetry/instrumentation-http": "0.214.0",
4343
"@opentelemetry/instrumentation-ioredis": "0.61.0",
4444
"@opentelemetry/instrumentation-koa": "0.61.0",
4545
"@opentelemetry/instrumentation-mongodb": "file:../../../opentelemetry-js-contrib-cx/packages/instrumentation-mongodb/opentelemetry-instrumentation-mongodb-0.66.0.tgz",

scripts/publish-sandbox.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ echo "==> publishing to $REGION"
5252
aws lambda publish-layer-version \
5353
--layer-name "$LAYER_NAME" \
5454
--license-info "Apache 2.0" \
55+
--description "cx-contrib@${CX_CONTRIB_SHA:0:7} built $(date -u +%Y-%m-%dT%H:%M:%SZ)" \
5556
--compatible-architectures "$AWS_ARCH" \
5657
--compatible-runtimes nodejs22.x nodejs24.x \
5758
--zip-file fileb://build-sandbox/layer.zip \

0 commit comments

Comments
 (0)