Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Add support BP_DATADOGTRACE_ENABLED #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vchrisb
Copy link

@vchrisb vchrisb commented Aug 19, 2021

Updated dependencies:

  • golang 1.16
  • pack 0.20.0
  • jam 0.14.3
  • buildpack.toml api 0.6

In addition to service binding will the buildpack participate if BP_DATADOGTRACE_ENABLED is set.

@vchrisb
Copy link
Author

vchrisb commented Aug 19, 2021

still WIP

Updated dependencies:
* golang `1.16`
* pack `0.20.0`
* jam `0.14.3`
* buildpack.toml api `0.6`

In addition to service binding will the buildpack participate if `BP_DATADOGTRACE_ENABLED` is set.
@vchrisb
Copy link
Author

vchrisb commented Aug 20, 2021

I've successfully tested the pull request with a spring sample application and do see the datadog trace agent:

Picked up JAVA_TOOL_OPTIONS: -Djava.security.properties=/layers/paketo-buildpacks_bellsoft-liberica/java-security-properties/java-security.properties -agentpath:/layers/paketo-buildpacks_bellsoft-liberica/jvmkill/jvmkill-1.16.0-RELEASE.so=printHeapHistogram=1 -javaagent:/layers/paketo-buildpacks_datadog-trace/datadog-trace-java/dd-java-agent.jar -XX:ActiveProcessorCount=6 -XX:MaxDirectMemorySize=10M -Xmx2490385K -XX:MaxMetaspaceSize=88998K -XX:ReservedCodeCacheSize=240M -Xss1M -Dorg.springframework.cloud.bindings.boot.enable=true
[dd.trace 2021-08-20 10:28:57:263 +0000] [dd-task-scheduler] INFO datadog.trace.agent.core.StatusLogger - DATADOG TRACER CONFIGURATION {"version":"0.85.0~2626c788b3","os_name":"Linux","os_version":"5.10.25-linuxkit","architecture":"amd64","lang":"jvm","lang_version":"11.0.12","jvm_vendor":"BellSoft","jvm_version":"11.0.12+7-LTS","java_class_version":"55.0","http_nonProxyHosts":"null","http_proxyHost":"null","enabled":true,"service":"org.springframework.boot.loader.JarLauncher","agent_url":"http://localhost:8126","agent_error":true,"debug":false,"analytics_enabled":false,"sampling_rules":[{},{}],"priority_sampling_enabled":true,"logs_correlation_enabled":true,"profiling_enabled":false,"appsec_enabled":false,"dd_version":"0.85.0~2626c788b3","health_checks_enabled":true,"configuration_file":"no config file present","runtime_id":"b376de41-fea9-4a47-b829-9ed5dd049fed","logging_settings":{"levelInBrackets":false,"dateTimeFormat":"'[dd.trace 'yyyy-MM-dd HH:mm:ss:SSS Z']'","logFile":"System.err","configurationFile":"simplelogger.properties","showShortLogName":false,"showDateTime":true,"showLogName":true,"showThreadName":true,"defaultLogLevel":"INFO","warnLevelString":"WARN","embedException":false}}

An image with these changes is available here: ghcr.io/vchrisb/datadog-trace-paketo-buildpack/datadog-trace-paketo-buildpack:1.0.3
Due to the lack of a datadog environment, I was not able to test it end-to-end.

Looking at the Datadog Java Agent docs, any configuration files are optional, hence the introduction of BP_DATADOGTRACE_ENABLED to make enablement easier.
I also set the datadog agent version explicitly to have a deterministic version in the buildpack.

@kevinfwl could you have a look at the proposed changes and test it with a Datadog environment? 💯

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant