Skip to content

Commit f66336b

Browse files
committed
Merge remote-tracking branch 'upstream/feature/go-migration' into feature/go-migration
2 parents 911e07e + 45bf19f commit f66336b

16 files changed

Lines changed: 1063 additions & 526 deletions

File tree

docs/framework-dynatrace_one_agent.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dynatrace SaaS/Managed OneAgent Framework
22
[Dynatrace SaaS/Managed](http://www.dynatrace.com/cloud-foundry/) is your full stack monitoring solution - powered by artificial intelligence. Dynatrace SaaS/Managed allows you insights into all application requests from the users click in the browser down to the database statement and code-level.
33

4-
The Dynatrace SaaS/Managed OneAgent Framework causes an application to be automatically configured to work with a bound [Dynatrace SaaS/Managed Service][] instance (Free trials available).
4+
The Java buildpack uses the [libbuildpack-dynatrace](https://github.com/Dynatrace/libbuildpack-dynatrace) library to automatically configure applications to work with a bound [Dynatrace SaaS/Managed Service][] instance (Free trials available).
55

66
<table>
77
<tr>
@@ -18,6 +18,16 @@ The Dynatrace SaaS/Managed OneAgent Framework causes an application to be automa
1818
</table>
1919
Tags are printed to standard output by the buildpack detect script
2020

21+
## Implementation
22+
This buildpack integrates with Dynatrace using the [libbuildpack-dynatrace](https://github.com/Dynatrace/libbuildpack-dynatrace) hook library (v1.8.0). This is the same integration library used by all modern Cloud Foundry buildpacks (Go, Node.js, Python, PHP, etc.), ensuring consistent behavior across the platform.
23+
24+
The integration:
25+
- Downloads and installs the Dynatrace OneAgent using the official PaaS installer
26+
- Configures `LD_PRELOAD` to inject the agent into the Java process
27+
- Fetches and merges the latest agent configuration from the Dynatrace API
28+
- Supports FIPS mode, network zones, and additional technologies
29+
- Provides retry logic and error handling for robust deployments
30+
2131
## User-Provided Service
2232
Users must provide their own Dynatrace SaaS/Managed service. A user-provided Dynatrace SaaS/Managed service must have a name or tag with `dynatrace` in it so that the Dynatrace Saas/Managed OneAgent Framework will automatically configure the application to work with the service.
2333

@@ -31,13 +41,25 @@ The credential payload of the service may contain the following entries:
3141
| `networkzone` | (Optional) Network zones are Dynatrace entities that represent your network structure. They help you to route the traffic efficiently, avoiding unnecessary traffic across data centers and network regions. Enter the network zone you wish to pass to the server during the OneAgent Download.
3242
| `skiperrors` | (Optional) The errors during agent download are skipped and the injection is disabled. Use this option at your own risk. Possible values are 'true' and 'false'. This option is disabled by default!
3343
| `enablefips`| (Optional) Enables the use of [FIPS 140 cryptographic algorithms](https://docs.dynatrace.com/docs/shortlink/oneagentctl#fips-140). Possible values are 'true' and 'false'. This option is disabled by default!
34-
| addtechnologies | (Optional) Adds additional OneAgent code-modules via a comma-separated list. See [supported values](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/deployment/oneagent/download-oneagent-version#parameters) in the "included" row|
44+
| `addtechnologies` | (Optional) Adds additional OneAgent code-modules via a comma-separated list. See [supported values](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/deployment/oneagent/download-oneagent-version#parameters) in the "included" row|
45+
| `customoneagenturl` | (Optional) Custom download URL for OneAgent. If set, `apiurl`, `environmentid`, and `apitoken` are not required.|
46+
47+
Example:
48+
```bash
49+
cf create-user-provided-service dynatrace -p '{"environmentid":"abc12345","apitoken":"dt0c01.ABC...XYZ"}'
50+
cf bind-service my-app dynatrace
51+
cf restage my-app
52+
```
3553

3654
## Configuration
3755
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
3856

3957
## Support
40-
This buildpack extension is currently Beta. If you have any questions or problems regarding the build pack itself please don't hesitate to contact Dynatrace on https://answers.ruxit.com/, be sure to use "cloudfoundry" as a topic.
58+
For questions about the buildpack integration, please open an issue on the [java-buildpack GitHub repository](https://github.com/cloudfoundry/java-buildpack).
59+
60+
For questions about Dynatrace itself, visit [Dynatrace support](https://support.dynatrace.com/).
61+
62+
For technical details about the integration library, see [libbuildpack-dynatrace](https://github.com/Dynatrace/libbuildpack-dynatrace).
4163

4264
[Configuration and Extension]: ../README.md#configuration-and-extension
4365
[Dynatrace SaaS/Managed Service]: http://www.dynatrace.com/cloud-foundry/

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/cloudfoundry/java-buildpack
33
go 1.25.4
44

55
require (
6+
github.com/Dynatrace/libbuildpack-dynatrace v1.8.0
67
github.com/cloudfoundry/libbuildpack v0.0.0-20251203175254-7be530ec9fef
78
github.com/cloudfoundry/switchblade v0.9.4
89
github.com/onsi/ginkgo/v2 v2.27.2

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
13581358
github.com/CycloneDX/cyclonedx-go v0.7.1/go.mod h1:N/nrdWQI2SIjaACyyDs/u7+ddCkyl/zkNs8xFsHF2Ps=
13591359
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
13601360
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
1361+
github.com/Dynatrace/libbuildpack-dynatrace v1.8.0 h1:VNcd8+rurUUdY12emGfLGUUj5cMH4hkNgrdk8LO3dHE=
1362+
github.com/Dynatrace/libbuildpack-dynatrace v1.8.0/go.mod h1:Uu9aa5UFAk1Ua+zZXnvzo+avDXuEi+GtegeOyja9xg4=
13611363
github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible/go.mod h1:BB1eHdMLYEFuFdBlRMb0N7YGVdM5s6Pt0njxgvfbGGs=
13621364
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk=
13631365
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=

src/java/finalize/cli/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"time"
77

88
"github.com/cloudfoundry/java-buildpack/src/java/finalize"
9+
_ "github.com/cloudfoundry/java-buildpack/src/java/hooks" // Register hooks (Dynatrace)
910
"github.com/cloudfoundry/libbuildpack"
1011
)
1112

0 commit comments

Comments
 (0)