-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Migrate dynatrace integration to LD_PRELOAD and support FIPS mode #1041
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
Changes from 2 commits
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 |
|---|---|---|
|
|
@@ -68,8 +68,12 @@ def release | |
|
|
||
| manifest = agent_manifest | ||
|
|
||
| @droplet.java_opts.add_agentpath(agent_path(manifest)) | ||
| @droplet.java_opts.add_preformatted_options('-Xshare:off') | ||
| environment_variables = @droplet.environment_variables | ||
| environment_variables.add_environment_variable(LD_PRELOAD, agent_path(manifest)) | ||
|
|
||
| if enable_fips? | ||
| File.delete(@droplet.sandbox + 'agent/dt_fips_disabled.flag') | ||
| end | ||
|
|
||
| dynatrace_environment_variables(manifest) | ||
| end | ||
|
|
@@ -87,6 +91,8 @@ def supports? | |
|
|
||
| APITOKEN = 'apitoken' | ||
|
|
||
| ENABLE_FIPS = 'enablefips' | ||
|
|
||
| DT_APPLICATION_ID = 'DT_APPLICATIONID' | ||
|
|
||
| DT_CONNECTION_POINT = 'DT_CONNECTION_POINT' | ||
|
|
@@ -99,6 +105,8 @@ def supports? | |
|
|
||
| DT_NETWORK_ZONE = 'DT_NETWORK_ZONE' | ||
|
|
||
| LD_PRELOAD = 'LD_PRELOAD' | ||
|
|
||
| ENVIRONMENTID = 'environmentid' | ||
|
|
||
| FILTER = /dynatrace/.freeze | ||
|
|
@@ -107,8 +115,9 @@ def supports? | |
|
|
||
| SKIP_ERRORS = 'skiperrors' | ||
|
|
||
| private_constant :APIURL, :APITOKEN, :DT_APPLICATION_ID, :DT_CONNECTION_POINT, :DT_NETWORK_ZONE, :DT_LOGSTREAM, | ||
| :DT_TENANT, :DT_TENANTTOKEN, :ENVIRONMENTID, :FILTER, :NETWORKZONE, :SKIP_ERRORS | ||
| private_constant :APIURL, :APITOKEN, :ENABLE_FIPS, :DT_APPLICATION_ID, :DT_CONNECTION_POINT, :DT_NETWORK_ZONE, | ||
| :DT_LOGSTREAM, :DT_TENANT, :DT_TENANTTOKEN, :LD_PRELOAD, :ENVIRONMENTID, :FILTER, :NETWORKZONE, | ||
| :SKIP_ERRORS | ||
|
|
||
| def agent_download_url | ||
| download_uri = "#{api_base_url(credentials)}/v1/deployment/installer/agent/unix/paas/latest?include=java" \ | ||
|
|
@@ -126,8 +135,8 @@ def agent_manifest | |
|
|
||
| def agent_path(manifest) | ||
| technologies = manifest['technologies'] | ||
| java_binaries = technologies['java']['linux-x86-64'] | ||
| loader = java_binaries.find { |bin| bin['binarytype'] == 'loader' } | ||
| java_binaries = technologies['process']['linux-x86-64'] | ||
|
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 change from
Contributor
Author
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. The use of
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. ok! |
||
| loader = java_binaries.find { |bin| bin['binarytype'] == 'primary' } | ||
| @droplet.sandbox + loader['path'] | ||
| end | ||
|
|
||
|
|
@@ -191,7 +200,11 @@ def logstream? | |
| end | ||
|
|
||
| def skip_errors? | ||
| credentials[SKIP_ERRORS].to_b | ||
| credentials[SKIP_ERRORS] == "true" | ||
|
||
| end | ||
|
|
||
| def enable_fips? | ||
| credentials[ENABLE_FIPS] == "true" | ||
|
||
| end | ||
|
|
||
| def tenanttoken(manifest) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.