Getting Started
  • Updated on 17 Jul 2019
  • 3 minutes to read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Getting Started

  • Print
  • Share
  • Dark
    Light

Retrace offers many basic and advanced features. In this article we will try to outline all of the amazing things that Retrace can do for your .NET applications.

Retrace for .NET 2.0 Setup Guide
These documents are for the version 2.0 of the Retrace .NET profiler. Currently in beta for .NET Core on Linux only. Please view the previous .NET APM setup guide for other workloads. We are working towards replacing the 1.0 profiler on Windows.
BETA
Please note that this is a beta version of this product, which is still undergoing final testing and feature validation before its official release. This product should be used only in a non-production environment. This product is provided on an “as is” and “as available” basis. Stackify does not provide any warranties, whether express or implied, as to the suitability or usability of this product. Stackify will not be liable for any loss, whether such loss is direct, indirect, special or consequential, suffered by any party as a result of their use of this product. Should you encounter any bugs, lack of functionality or other problems with this product, please let us know immediately.

Step 1. Install Retrace

The first thing you need to do is install the Retrace monitoring agent on your server.

Standard Installs

Supported Linux Distributions
See Supported Technologies for distribution support details. Other distros may be successfully used, but have not been validated. Red Hat Enterprise Linux 6 is known not to work in the current beta release.

Container Installs
Retrace supports multiple container based deployment scenarios.

Step 2. Configure Your App

Retrace supports multiple application types. Based on your type of application, there may be some additional steps that are needed.

  • ASP.NET Core - Note: In the previous version of the Retrace .NET profiler for Windows, a Stackify middleware had to be added to your application. This is not required in this version of the profiler.
  • Background services - You must manually instrument your code to define transactions.

Set the Environment Variables Required by the Profiler

The .NET CLR requires environment variables to be set in order to load a profiler into a process. There are several ways to set these environment variables. Here is an example that only needs to be set once and will be available to each new process that loads without any additional steps.

  1. Open environment from the command-line
    sudo nano /etc/environment
    
  2. Add the environment variables
    CORECLR_PROFILER={cf0d821e-299b-5307-a3d8-b283c03916da}
    CORECLR_ENABLE_PROFILING=1
    CORECLR_PROFILER_PATH="/usr/local/stackify/stackify-dotnet-apm/StackifyProfiler.so"
    
Configuring for systemd
If you are running your .NET Core application within systemd, you will need to modify conf file for your job..NET Core for Linux Systemd Configuration

Step 3. Name Your Application

Create a file named Stackify.json and save it in the deployment folder of your application.

{
    "AppName": "MyApp",
    "Environment": "Production"
}

Step 4. Send Your Logs to Retrace

You can send your applications logs to Retrace with multiple .NET logging frameworks. Be sure to send your logs to take full advantage of Retrace's error tracking and centralized logging features. Errors are also used as part of Retrace's "App Scoring" feature.

Step 5. Deployment Tracking

Notify Retrace when you do a new deployment to get advanced reporting features. This makes it easy to see how performance changes after a new deployment. Popular tools like Team City, Visual Studio Team Services, Octopus Deploy and others are supported. View our docs to learn more.

Disabling Tracing

If you want to temporarily disable collection of APM data, you can add a property to the Stackify.json file to cause the profiler to be disabled. This does not impact collection of logs that are sent to Retrace.

{
    "AppName": "MyApp",
    "Environment": "Production",
    "DisableTracing": true
}

Additional Topics

Was this article helpful?