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

+Windows Services & Standalone apps instrumentation #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion attributes/dotnet_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
default['appdynamics']['dotnet_agent']['checksum'] = '7acb3756147a1d5a13c49b107a890ea56a8eb4099fd793e498e34b6f0b5962dc' #nil
default['appdynamics']['dotnet_agent']['install_dir'] = 'C:\Program Files\Appdynamics'
default['appdynamics']['dotnet_agent']['logfiles_dir'] = 'C:\DotNetAgent\Logs'

default['appdynamics']['dotnet_agent']['standalone_apps'] = nil #'a.exe,b.exe'
Copy link
Contributor

Choose a reason for hiding this comment

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

Does comma separated make sense here? Why not take an array?

default['appdynamics']['dotnet_agent']['standalone_apps'] = ['a.exe', 'b.exe']

Then you don't have to split in the template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah - thats fine too. I just wanted to keep the attributes simple.

Copy link
Contributor

Choose a reason for hiding this comment

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

if there are multiple exe's like a.exe & b.exe both will end up with the same app_name/tier_name in the controller even though they are different exe's. can we change the standalone_apps to an array that includes the 3 possible properties? standalone-application executable, command-line, and tier name

example config from the docs

    <standalone-applications>
        <standalone-application executable="MyWindowsService.exe" command-line="-x">
           <tier name="Windows Service Tier" />
        </standalone-application>
        <standalone-application executable="MyStandaloneApp.exe">
           <tier name="Standalone Tier" />
        </standalone-application>
    </standalone-applications>

https://docs.appdynamics.com/display/PRO41/Instrument+Windows+Services+and+Standalone+Applications

default['appdynamics']['dotnet_agent']['template']['cookbook'] = 'appdynamics'
default['appdynamics']['dotnet_agent']['template']['source'] = 'dotnet/setup.config.erb'
1 change: 1 addition & 0 deletions recipes/dotnet_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
:controller_accesskey => controller['accesskey'],
:proxy_host => proxy['host'],
:proxy_port => proxy['port'],
:standalone_apps => agent['standalone_apps']
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation got messed up 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.

I'm not sure why the indentations are getting messed up. This happens only when I publish it to github. My local files looks okay.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you perhaps mixing tabs and spaces?

On Friday, July 10, 2015, thiru-chidambaram [email protected]
wrote:

In recipes/dotnet_agent.rb
#18 (comment)
:

@@ -68,6 +68,7 @@
:controller_accesskey => controller['accesskey'],
:proxy_host => proxy['host'],
:proxy_port => proxy['port'],

  • :standalone_apps => agent['standalone_apps']

I'm not sure why the indentations are getting messed up. This happens only
when I publish it to github. My local files looks okay.


Reply to this email directly or view it on GitHub
https://github.com/Appdynamics/appdynamics-cookbooks/pull/18/files#r34402059
.

)
end

Expand Down
9 changes: 9 additions & 0 deletions templates/default/dotnet/setup.config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
<IIS>
<automatic enabled="true" />
</IIS>
<% unless @standalone_apps.nil? %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation in this block is very strange. Looks like the rest of the file is two spaces, so we should keep it as two consistently.

<standalone-applications>
<% @standalone_apps.split(',').each { |app_name| puts %>
<standalone-application executable="<%= app_name%>">
<tier name="<%= app_name%>" />
</standalone-application>
<%}%>
</standalone-applications>
<% end %>
</app-agents>
</appdynamics-agent>
</winston>