Skip to content
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

Change default send strategy to background #332

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apmproxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func NewClient(opts ...Option) (*Client, error) {
WriteTimeout: defaultDataReceiverTimeout,
MaxHeaderBytes: 1 << 20,
},
sendStrategy: SyncFlush,
sendStrategy: Background,
flushCh: make(chan struct{}),
}

Expand Down
2 changes: 1 addition & 1 deletion docs/monitoring-aws-lambda.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ The timeout value, for the {apm-lambda-ext}'s HTTP client sending data to the AP
[float]
=== `ELASTIC_APM_SEND_STRATEGY`
Whether to synchronously flush APM agent data from the {apm-lambda-ext} to the APM Server at the end of the function invocation.
The two accepted values are `background` and `syncflush`. The _default_ is `syncflush`.
The two accepted values are `background` and `syncflush`. The _default_ is `background`.

* The `background` strategy indicates that the {apm-lambda-ext} will not flush when it receives a signal that the function invocation
has completed. It will instead send any remaining buffered data on the next function invocation. The result is that, if the
Expand Down
1 change: 1 addition & 0 deletions e2e-testing/sam-java/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Resources:
ELASTIC_APM_CENTRAL_CONFIG: false
ELASTIC_APM_CLOUD_PROVIDER: none
ELASTIC_APM_SERVER_URL: http://localhost:8200
ELASTIC_APM_SEND_STRATEGY: syncflush
AWS_LAMBDA_EXEC_WRAPPER: /opt/elastic-apm-handler
ELASTIC_APM_APPLICATION_PACKAGES: true
APM_AWS_EXTENSION_TEST_UUID: !Ref TestUUID
1 change: 1 addition & 0 deletions e2e-testing/sam-nodejs/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ Resources:
ELASTIC_APM_CENTRAL_CONFIG: false
ELASTIC_APM_CLOUD_PROVIDER: none
ELASTIC_APM_SERVER_URL: http://localhost:8200
ELASTIC_APM_SEND_STRATEGY: syncflush
APM_AWS_EXTENSION_TEST_UUID: !Ref TestUUID
1 change: 1 addition & 0 deletions e2e-testing/sam-python/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ Resources:
ELASTIC_APM_CENTRAL_CONFIG: false
ELASTIC_APM_CLOUD_PROVIDER: none
ELASTIC_APM_SERVER_URL: http://localhost:8200
ELASTIC_APM_SEND_STRATEGY: syncflush
APM_AWS_EXTENSION_TEST_UUID: !Ref TestUUID
1 change: 1 addition & 0 deletions tf/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module "lambda_function" {
ELASTIC_APM_LOG_LEVEL = var.log_level
ELASTIC_APM_LAMBDA_APM_SERVER = module.ec_deployment.apm_url
ELASTIC_APM_SECRET_TOKEN = module.ec_deployment.apm_secret_token
ELASTIC_APM_SEND_STRATEGY = "syncflush"
}

tags = {
Expand Down