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

Reworked Dynatrace integrations #336

Merged
merged 1 commit into from
Oct 10, 2016
Merged

Reworked Dynatrace integrations #336

merged 1 commit into from
Oct 10, 2016

Conversation

aloismayr
Copy link
Contributor

In this PR I've reworked the our integrations and worked on the following:

  • Renamed Ruxit to Dynatrace OneAgent
  • Renamed DynaTrace to Dynatrace Appmon
  • Updated detection criterion for Dynatrace OneAgent (SaaS/Managed)
    • tenant, tenanttoken and server are deprecated (but still supported for the sake of backward compatibilty)
    • environmentid, apitoken and endpoint are the new required fields
  • Dynatrace OneAgent will be downloaded from Dynatrace SaaS/Managed cluster via REST API (if apitoken given) rather than from the public repository
  • Public repository will still be maintained for ensuring backward compatibility
  • Updated documentation and tests
  • Minor bugfix to support caching of HTTP downloads with query parameters

@cfdreddbot
Copy link

Hey aloismayr!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

Copy link
Contributor

@nebhale nebhale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another awesome contribution. Most of my requests are either documentation changes or clarification on bits and pieces. Feel free to push back if you think I'm asking for things that aren't appropriate.

@@ -17,4 +17,4 @@
---
version: 6.3.0_+
repository_root: http://downloads.dynatracesaas.com/cloudfoundry/buildpack/java
default_agent_name:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this seems crazy, but the space was here for a reason and should be replaced. I don't believe this will be an issue for you as this change has no net result.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No clue how and why the space has disappeared. I added it again.


The applications Cloud Foundry name is used as the `agent group` in DynaTrace, and must be pre-configured on the DynaTrace server.
The applications Cloud Foundry name is used as the `agent group` in Dynatrace Appmon, and must be pre-configured on the Dynatrace server.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

application's

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Changed that!

* The DynaTrace agent slows down app execution significantly at first, but gets faster over time. Setting the application manifest to contain `maximum_health_check_timeout` of 180 or more and/or using `cf push -t 180` or more when pushing a DynaTrace-monitored application may help.
* Multiple `cf push`s will cause dead penguins to build up in the DynaTrace agent dashboard, as CF launches/disposes application containers. These can be hidden but will collect in the dynatrace database.
* The Dynatrace Appmon agent slows down app execution significantly at first, but gets faster over time. Setting the application manifest to contain `maximum_health_check_timeout` of 180 or more and/or using `cf push -t 180` or more when pushing a Dynatrace-monitored application may help.
* Multiple `cf push`s will cause dead penguins to build up in the Dynatrace Appmon dashboard, as CF launches/disposes application containers. These can be hidden but will collect in the Dynatrace database.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to double check that you actually mean "dead penguins" and it's not an auto-correct thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Reworked the complete NOTE section.


<table>
<tr>
<td><strong>Detection Criterion</strong></td><td>Existence of a single bound DynaTrace service.
<td><strong>Detection Criterion</strong></td><td>Existence of a single bound Dynatrace service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to call this a "single bound Dynatrace AppMon service" with the same clarity on the other type of Dynatrace service?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Yeah, changed "Dynatrace service" to "Dynatrace Appmon service" where applicable and meaningful.

</tr>
</table>
Tags are printed to standard output by the buildpack detect script

## User-Provided Service
Users must provide their own DynaTrace service. A user-provided DynaTrace service must have a name or tag with `dynatrace` in it so that the DynaTrace Agent Framework will automatically configure the application to work with the service.
Users must provide their own Dynatrace service. A user-provided Dynatrace service must have a name or tag with `dynatrace` in it so that the Dynatrace Appmon Agent Framework will automatically configure the application to work with the service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same clarification of which Dynatrace service here. Specifically, I'm not asking to change the detection criteria, just the documentation of that criteria.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, also changed the wording to Dynatrace Appmon service here.

<ul>
<li>Existence of a DynaTrace service is defined as the <a href="http://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html#VCAP-SERVICES"><code>VCAP_SERVICES</code></a> payload containing a service who's name, label or tag has <code>dynatrace</code> as a substring and contains <code>server</code> field in the credentials. Note: The credentials must <b>NOT</b> contain <code>tenant</code> and <code>tenanttoken</code> in order to make sure the detection mechanism does not interfere with Dynatrace Ruxit integration.</li>
<li>Existence of a Dynatrace service is defined as the <a href="http://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html#VCAP-SERVICES"><code>VCAP_SERVICES</code></a> payload containing a service who's name, label or tag has <code>dynatrace</code> as a substring and contains <code>server</code> field in the credentials. Note: The credentials must <b>NOT</b> contain <code>tenant</code> and <code>tenanttoken</code> in order to make sure the detection mechanism does not interfere with Dynatrace SaaS/Managed integration.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same clarification here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed "Dynatrace service" to "Dynatrace Appmon service" where applicable and meaningful.


<table>
<tr>
<td><strong>Detection Criterion</strong></td><td>Existence of a single bound Dynatrace service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reverse of the earlier Dynatrace service clarification.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Changed to Dynatrace SaaS/Managed service.

</ul>
</td>
</tr>
</table>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing listing of tags.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also added the tag row.

download_uri = server(credentials).gsub('/communication', '').gsub(':8443', '').gsub(':443', '')
download_uri += '/api/v1/deployment/installer/agent/unix/paas/latest?include=java&bitness=64&'
download_uri += "Api-Token=#{credentials[APITOKEN]}"
['latest', download_uri]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally latest is good enough here. Just want to be clear that not having a real version means that it'll be difficult for operators to determine which applications are vulnerable our out of date. It's more a serviceability issue than anything else and I'd encourage you to put in a real version if possible. If not, this is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. At the time of compiling the download URL we don't know about the exact version we will get. We only know it is the latest version available for the respective environment. We could add a log-message in the compile or release step tough.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, no worries. Just one of those things to think about for the longer term. Maybe another URI that exposes the version or even a HEAD request to that URI which returns a header with the value in it. Nothing that can't be added in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understand, sounds good to me.

@@ -33,7 +33,7 @@ class CachedFile
# @param [String] uri a uri which uniquely identifies the file in the cache
# @param [Boolean] mutable whether the cached file should be mutable
def initialize(cache_root, uri, mutable)
key = URI.escape(uri.sanitize_uri, ':/')
key = URI.escape(uri.sanitize_uri, ':/&')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not many people have the courage to submit a change to the core functionality 😉 Definitely a needed change though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I don't wanted to smuggle this into the core functionality with the PR. Hope this was okay tough. Next time I'll talk to you first - or create an issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, no! This was a perfect change that I'm happy to have. Just most people never dive deeply enough into the code to know what they need to do. More like this please.

 - Renamed Ruxit to Dynatrace OneAgent
 - Renamed DynaTrace to Dynatrace Appmon
 - Updated detection criterion for Dynatrace OneAgent (SaaS/Managed)
	- tenant, tenanttoken and server are deprecated (but still supported for the sake of backward compatibilty)
	- environmentid, apitoken and endpoint are the new required fields
 - Dynatrace OneAgent will be downloaded from Dynatrace SaaS/Managed cluster via REST API (if apitoken given) rather than from the public repository
 - Public repository will still be maintained for ensuring backward compatibility
 - Updated documentation and tests
 - Minor bugfix to support caching of HTTP downloads with query parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants