Jaa


Configure Tracking

This topic describes how you can use AppFabric cmdlets to configure tracking for an application or a service. The cmdlets that you can use for configuring tracking are Import-ASAppServiceTrackingProfile, Get-ASAppServiceTracking, Remove-ASAppServiceTrackingProfile, and Get-ASAppServiceTrackingProfile.

To execute an AppFabric cmdlet interactively, open the Windows PowerShell console for AppFabric, enter the appropriate cmdlet, and then press ENTER. For more information about executing cmdlets, see Running AppFabric Cmdlets.

To import tracking information for an application

In the Windows PowerShell console, execute the Import-ASAppServiceTrackingProfile cmdlet to configure tracking, which is used to monitor service operations. This cmdlet imports a tracking profile from the specified file into the specified level target configuration file. The target (scope) of this operation can be the computer Machine.config file; the root Web.config file; or a Web.config file with a path specified by site, application, application virtual directory, service, or service instance. If a service is specified, it must be an .svc, .xamlx, or .xoml service.

Syntax options for Import-ASAppServiceTrackingProfile:

Syntax 1

Import-ASAppServiceTrackingProfile [-SiteName] <String> [[-VirtualPath] <String>] [-FilePath] <String> [-Overwrite] [-ProfileName <String>]

Syntax 2

Import-ASAppServiceTrackingProfile [-Uri] <Uri> [-FilePath] <String> [-Overwrite] [-ProfileName <String>]

Syntax 3

Import-ASAppServiceTrackingProfile [-FilePath] <String> -ApplicationObject <ApplicationInfo> [-Overwrite] [-ProfileName <String>]

Syntax 4

Import-ASAppServiceTrackingProfile [-FilePath] <String> -ServiceObject <ServiceInfo> [-Overwrite] [-ProfileName <String>]

Syntax 5

Import-ASAppServiceTrackingProfile [-FilePath] <String> [-Overwrite] [-ProfileName <String>] -Root
Parameter Description

[-SiteName] <String> [[-VirtualPath] <String>], [-Uri] <Uri>, -ApplicationObject <ApplicationInfo>, -ServiceObject <ServiceInfo>, or -Root

Operational scope of cmdlet

[-FilePath] <String>

Specifies the name of the file (including the path) from which to import the tracking profile. This parameter is required. The file must contain exactly one profile.

[-Overwrite]

Optional. If this parameter is specified, any existing tracking profile configuration is overwritten. The behavior is equivalent to calling Remove-TrackingProfile followed by Import-TrackingParticipant without the –overwrite flag. The cmdlet will fail if the tracking profile cannot be removed.

[-ProfileName <String>]

Specifies the name to assign to the imported tracking profile. It specifies the name attribute of the profile element. This parameter is optional. If specified, this parameter overrides the name specified in the file.

To obtain tracking information for an application

In the Windows PowerShell console, execute the Get-ASAppServiceTracking cmdlet to obtain the current tracking settings for a service using a ServiceTrackingInfo object that describes the current tracking settings for the service. The object contains a list of tracking components that are enabled for the service and a flag that indicates if tracking is enabled on the service. The target (scope) of this operation is the Web.config file associated with a service (or service instance).

Syntax options for Get-ASAppServiceTracking:

Syntax 1

Get-ASAppServiceTracking [-SiteName] <String> [[-VirtualPath] <String>]

Syntax 2

Get-ASAppServiceTracking [-Uri] <Uri>

Syntax 3

Get-ASAppServiceTracking -ApplicationObject <ApplicationInfo>

Syntax 4

Get-ASAppServiceTracking -ServiceObject <ServiceInfo>

Syntax 5

Get-ASAppServiceTracking -Root
Parameter Description

[-SiteName] <String> [[-VirtualPath] <String>], [-Uri] <Uri>, -ApplicationObject <ApplicationInfo>, -ServiceObject <ServiceInfo>, or -Root

Operational scope of cmdlet

To set tracking information for an application

In the Windows PowerShell console, execute the Set-AsAppServiceTracking cmdlet to set the tracking information for the Web application at the specified scope.

Syntax options for Set-AsAppServiceTracking:

Syntax 1

Set-ASAppServiceTracking [-SiteName] <String> [[-VirtualPath] <String>] -ProfileName <String>

Syntax 2

Set-ASAppServiceTracking [-Uri] <Uri> -ProfileName <String>

Syntax 3

Set-ASAppServiceTracking -ApplicationObject <ApplicationInfo> -ProfileName <String>

Syntax 4

Set-ASAppServiceTracking -ProfileName <String> -ServiceObject <ServiceInfo>

Syntax 5

Set-ASAppServiceTracking -ProfileName <String> -Root
Parameter Description

[-SiteName] <String> [[-VirtualPath], [-Uri] <Uri>, -ApplicationObject <ApplicationInfo>, or -Root

Operational scope of cmdlet

-ProfileName

Name of profile containing tracking information to set

To remove tracking information for an application

In the Windows PowerShell console, execute the Remove-ASAppServiceTrackingProfile cmdlet to remove a tracking profile from the specified level of the configuration. This cmdlet is used to configure tracking, which is used to monitor service operations.

Syntax options for Remove-ASAppServiceTrackingProfile:

Syntax 1

Remove-ASAppServiceTrackingProfile [-SiteName] <String> [[-VirtualPath] <String>] -ProfileName <String>

Syntax 2

Remove-ASAppServiceTrackingProfile [-Uri] <Uri> -ProfileName <String>

Syntax 3

Remove-ASAppServiceTrackingProfile -ApplicationObject <ApplicationInfo> -ProfileName <String>

Syntax 4

Remove-ASAppServiceTrackingProfile -ProfileName <String> -ServiceObject <ServiceInfo>

Syntax 5

Remove-ASAppServiceTrackingProfile -ProfileName <String> -Root
Parameter Description

[-SiteName] <String> [[-VirtualPath] <String>], [-Uri] <Uri>, -ApplicationObject <ApplicationInfo>, -ServiceObject <ServiceInfo>, or -Root

Operational scope of cmdlet

-ProfileName <String>

Specifies the name of the tracking profile to remove. The profile must be defined locally in the target configuration file. This parameter is required.

To obtain a tracking profile for an application

In the Windows PowerShell console, execute the Get-ASAppServiceTrackingProfile cmdlet to return the tracking profiles visible to a service (includes profiles defined at all scopes) in a TrackingProfileInfo class. All of the settings in the configuration hierarchy of the target configuration file are in scope for this operation. This means that it can return both local (those defined in the target file) and inherited (those defined in the Machine.config file or the root Web.config file) settings.

Syntax options for Get-ASAppServiceTrackingProfile:

Syntax 1

Get-ASAppServiceTrackingProfile [-SiteName] <String> [[-VirtualPath] <String>] [-ProfileName <String>]

Syntax 2

Get-ASAppServiceTrackingProfile [-Uri] <Uri> [-ProfileName <String>]

Syntax 3

Get-ASAppServiceTrackingProfile -ApplicationObject <ApplicationInfo> [-ProfileName <String>]

Syntax 4

Get-ASAppServiceTrackingProfile -ServiceObject <ServiceInfo> [-ProfileName <String>]

Syntax 5

Get-ASAppServiceTrackingProfile [-ProfileName <String>] -Root
Parameter Description

[-SiteName] <String> [[-VirtualPath] <String>], [-Uri] <Uri>, -ApplicationObject <ApplicationInfo>, -ServiceObject <ServiceInfo>, or -Root

Operational scope of cmdlet

-ProfileName <String>

Specifies the name of the tracking profile to return. The profile can be either defined locally in the target configuration file or inherited from its configuration file hierarchy. This parameter is optional. If the ProfileName parameter is not specified, all tracking profiles (both local and inherited) associated with the target configuration file are returned.

  2012-09-12