# azureservicefabric-dotnet-tracing-sample
**Repository Path**: mirrors_DataDog/azureservicefabric-dotnet-tracing-sample
## Basic Information
- **Project Name**: azureservicefabric-dotnet-tracing-sample
- **Description**: Sample Application with Datadog APM enabled
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-17
- **Last Updated**: 2025-10-11
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
---
languages:
- csharp
products:
- azure
- azure-service-fabric
page_type: sample
description: "The quickstart contains an application with multiple services demonstrating the concepts of service communication and use of reliable dictionaries, in conjunction with Datadog installation."
---
# NOTE: This document is outdated. The recommended way to deploy the tracer in Service Fabric is with the [Datadog.Trace.Bundle](https://www.nuget.org/packages/Datadog.Trace.Bundle) NuGet package.
# Service Fabric .NET Tracer Quickstart
This repository contains an quickstart project for [Microsoft Azure Service Fabric](https://azure.microsoft.com/services/service-fabric/). The quickstart project contains a single application with multiple services demonstrating the basic concepts of service communication and use of reliable dictionaries.
For a guided tour with the quickstart:
[Service Fabric .NET quickstart](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-quickstart-dotnet)
More info on Service Fabric:
- [Documentation](https://docs.microsoft.com/azure/service-fabric/)
- [Service Fabric sample projects](https://azure.microsoft.com/resources/samples/?service=service-fabric)
- [Service Fabric open source home repo](https://github.com/azure/service-fabric)
This guide does not include how-to on setting up and configuring an Azure Service Fabric Cluster.
## Create a Service Fabric application

Start with a stateless ASP.NET Core application, and use MVC as a template.

## Setting up the Datadog Agent
Add a new Service Fabric Service to the solution.


Replace the `ServiceManifest.xml` with this:
```
datadog/agent
```
Add the corresponding port bindings to the `ServiceManfestImport` section in `ApplicationManifest.xml`:
```
```
## Installing the .NET Tracer
Installing the tracer requires machine administrator permissions.
Add the `SetupAdminUser` to the `Principals` section in `ApplicationManifest.xml`. If the `Principals` section is missing, add it.
```
```
In the `ServiceManifestImport` section of the service responsible for deploying the tracer to the cluster, set `SetupAdminUser` as the executing user for the `Setup` script.
```
```
In the `ServiceManifest.xml` of the service responsible for deploying the tracer, add the reference to the install script:
```
DatadogInstall.bat
CodePackage
ServiceThatDeploysDatadogTracer.exe
CodePackage
```
Include the `DatadogInstall.bat` and `DatadogInstall.ps1` scripts in the project responsible for deploying the tracer.
In the file properties of both scripts, set them to be copied to the output directory.

The latest representation of this install process is here: https://github.com/DataDog/dd-trace-dotnet-asf-sample/tree/master/VotingWeb
- [Batch Script](https://github.com/DataDog/dd-trace-dotnet-asf-sample/blob/master/VotingWeb/DatadogInstall.bat)
- [Powershell Script](https://github.com/DataDog/dd-trace-dotnet-asf-sample/blob/master/VotingWeb/DatadogInstall.ps1)
---