DataDog / datadog-cloudfoundry-buildpack

Datadog Cloud Foundry Buildpack
Apache License 2.0
10 stars 15 forks source link

Trace Agent is not accepting traffic before all .profile.d scripts complete #117

Closed keviningvalson closed 1 year ago

keviningvalson commented 3 years ago

Bug

golang application starts attempting to use Datadog Trace Agent before it is accepting traffic resulting in no APM capabilities

Sequence to reproduce

Follow Tracing Go Application for a golang app using this supply buildpack

lib/run-datadog.sh starts the Datadog Trace Agent via a shell script in the background via this buildpack Start tracer using gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer

Resulting error

[APP/PROC/WEB/0]ERR 2021/09/16 20:55:58 Datadog Tracer v1.33.0 WARN: DIAGNOSTICS Unable to reach agent intake: Post "http://localhost:8126/v0.4/traces": dial tcp 127.0.0.1:8126: connect: connection refused

Versions

Capability Statement/Expected Behavior

As a Cloud Foundry golang Application Owner I want the Datadog Trace Agent accepting traffic before my application attempts to start So that APM capabilities with my application can rely the initial health state of the Datadog Trace Agent for runtime state

Workaround

The following workaround within the application code appears to address the issue

.profile.d/sleep-for-datadog.sh

echo 'Sleeping for Datadog Agent Start'
sleep 5
github-actions[bot] commented 1 year ago

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.

If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of this project.

  2. Comment that the issue is still reproducible and include updated details requested in the issue template.

github-actions[bot] commented 1 year ago

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.

If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of this project.

  2. Comment that the issue is still reproducible and include updated details requested in the issue template.