-
Notifications
You must be signed in to change notification settings - Fork 24
[Node] Custom Metrics E2E Test #481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
32bf600
83503ea
6d9bfa5
1db3744
f0eb34a
bf956c7
997d582
6acaa49
3057ec0
9b61eec
125fda8
f01531f
f874743
8d86956
9aa26e5
2cb03ba
7ad9162
60e56fd
181fe05
f064b81
afd9301
cacb3fe
17a64e5
07a7551
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,11 +10,18 @@ | |
| "author": "", | ||
| "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@aws-sdk/client-s3": "3.621.0", | ||
| "@aws-sdk/client-s3": "^3.621.0", | ||
| "@aws/aws-distro-opentelemetry-node-autoinstrumentation": "^0.8.0", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is |
||
| "@opentelemetry/api": "^1.9.0", | ||
| "@opentelemetry/exporter-metrics-otlp-proto": "^0.57.1", | ||
| "@opentelemetry/resources": "^1.30.1", | ||
| "@opentelemetry/sdk-metrics": "^1.30.1", | ||
| "@opentelemetry/semantic-conventions": "^1.37.0", | ||
| "@opentelemetry/sdk-node": "^0.57.0", | ||
| "@types/express": "^4.17.21", | ||
| "@types/node": "^20.14.6", | ||
| "bunyan": "^1.8.15", | ||
| "express": "^4.21.2", | ||
| "mysql2": "^3.11.0", | ||
| "bunyan": "^1.8.15" | ||
| "mysql2": "^3.15.3" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is an update to |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -153,20 +153,34 @@ resource "null_resource" "main_service_setup" { | |
| # Get ADOT instrumentation and install it | ||
| ${var.get_adot_instrumentation_command} | ||
|
|
||
| # Set up application tmux screen so it keeps running after closing the SSH connection | ||
| tmux new-session -d -s frontend | ||
| # Set up environment variables like Python does | ||
| export SERVICE_NAME='node-sample-application-${var.test_id}' | ||
| export DEPLOYMENT_ENVIRONMENT_NAME='ec2:default' | ||
| export OTEL_RESOURCE_ATTRIBUTES="service.name=$${SERVICE_NAME},deployment.environment.name=$${DEPLOYMENT_ENVIRONMENT_NAME}" | ||
| export AWS_REGION='${var.aws_region}' | ||
| export TESTING_ID='${var.test_id}' | ||
|
|
||
| # Set up application tmux screen with bash shell | ||
| tmux new-session -d -s frontend bash | ||
|
|
||
| # Export environment variables for instrumentation | ||
| # Note: We use OTEL_NODE_DISABLED_INSTRUMENTATIONS=fs,dns,express to avoid | ||
| # having to validate around the telemetry generated for middleware | ||
| tmux send-keys -t frontend 'export OTEL_METRICS_EXPORTER=none' C-m | ||
| tmux send-keys -t frontend 'export OTEL_METRICS_EXPORTER=otlp' C-m | ||
| tmux send-keys -t frontend 'export OTEL_TRACES_EXPORTER=otlp' C-m | ||
| tmux send-keys -t frontend 'export OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true' C-m | ||
| tmux send-keys -t frontend 'export OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED=false' C-m | ||
| tmux send-keys -t frontend 'export OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics' C-m | ||
| tmux send-keys -t frontend 'export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces' C-m | ||
| tmux send-keys -t frontend 'export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf' C-m | ||
| tmux send-keys -t frontend 'export OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=http/protobuf' C-m | ||
| tmux send-keys -t frontend 'export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://localhost:4318/v1/metrics' C-m | ||
| tmux send-keys -t frontend 'export OTEL_EXPORTER_OTLP_METRICS_INSECURE=true' C-m | ||
| tmux send-keys -t frontend 'export SERVICE_NAME="$${SERVICE_NAME}"' C-m | ||
| tmux send-keys -t frontend 'export DEPLOYMENT_ENVIRONMENT_NAME="$${DEPLOYMENT_ENVIRONMENT_NAME}"' C-m | ||
| tmux send-keys -t frontend 'export OTEL_RESOURCE_ATTRIBUTES="$${OTEL_RESOURCE_ATTRIBUTES}"' C-m | ||
| tmux send-keys -t frontend 'export AWS_REGION="$${AWS_REGION}"' C-m | ||
| tmux send-keys -t frontend 'export TESTING_ID="$${TESTING_ID}"' C-m | ||
| tmux send-keys -t frontend 'export OTEL_NODE_DISABLED_INSTRUMENTATIONS=fs,dns,express' C-m | ||
| tmux send-keys -t frontend 'export OTEL_SERVICE_NAME=node-sample-application-${var.test_id}' C-m | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Should use |
||
| tmux send-keys -t frontend 'export OTEL_TRACES_SAMPLER=always_on' C-m | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Remove whitespace changes