Download PDF
Download page .NET Core for Linux SDK Reference.
.NET Core for Linux SDK Reference
To instrument .NET Core for Linux applications, you use the .NET Core for Linux SDK. Once you have deployed the .NET Core for Linux SDK into your application, AppDynamics automatically instruments the application. You can customize the application instrumentation using these business transaction and exit call methods.
You must start all transactions using the StartBusinessTransaction
method in the .NET Core for Linux SDK.
This page describes the methods defined in the SDK.
Using the SDK
Namespace: AppDynamics.AgentSDK
Assembly: AppDynamics.Agent.SDK.dll
Business Transaction Methods
StartBusinessTransaction
Starts the Business Transaction.
Format: StartBusinessTransaction(<name>, <entryPointType>, <correlationHeader>)
Parameters:
name
– Business Transaction name.entryPointType
– Type of entry point, such as ASP_DOTNET and POCOcorrelationHeader
– AppDynamics correlation header. Optional.
Return Type: AppDynamics.BusinessTransaction
StopBusinessTransaction
Stop the Business Transaction
Format: AgentSDK.StopBusinessTransaction(<bt>)
Parameters: bt
– Business transaction object returned by the StartBusinessTransaction method.
Return Type: void
AddDataToTransactionSnapshot
Add identifying information to the transaction snapshot.
Format: AgentSDK.AddDataToTransactionSnapshot(<bt>, <key>, <value>)
Parameters:
bt
– The business transaction for which AppDynamics creates a snapshot. Returned by the StartBusinessTransaction method.key
– Key in key/value pairvalue
– Value in key/value pair
Return Type: void
Exit Call Methods
CreateExitCall
Create an Exit Call
Format: AgentSDK.CreateExitCall(<bt>, <exitPointType>, <name>, <isAsync>)
Parameters:
bt
– BusinessTransaction on which to create an exit call.exitPointType
– Type of exit call, such as HTTP, WCF, and ADO.NETname
– Name of exit call.isAsync
– Boolean value to identify exit call as asynchronous. Optional. Default value: false
Return Type: AppDynamics.ExitCall
AddIdentifyingPropertyToExitCall
Add properties to the exit call.
Format: AgentSDK. AddIdentifyingPropertyToExitCall(ExitCall <exitCall
>, <string_property>, <string_value>)
Parameters:
exitCall
– Business transaction for which AppDynamics creates a the snapshot. Returned by StartBusinessTransaction.string_property
– Name of the property. For example, the URL.string_value
– Value of the property. For example, http://www.google.com.
Return Type: void
StartExitCall
Start an exit call to the specified backend as part of a business transaction
Format: AgentSDK.StartExitCall(ExitCall <exitCall>)
Parameters: exitCall
– ExitCall type returned by CreateExitCall.
Return Type: void
StopExitCall
Complete the exit call
Format: AgentSDK.StopExitCall(ExitCall <exitCall>)
Parameters: exitCall
– ExitCall type returned by CreateExitCall.
Return Type: void
AddErrorToTransaction
Register an error for the business transaction
Format: AgentSDK. AddErrorToTransaction (<bt>, <name>, <message>, <errorCode>, <markBtAsError>)
Parameters
bt
– BusinessTransaction for which AppDynamics creates a snapshot. Returned by StartBusinessTransaction.name
– Name of Error.message
– Error message.errorCode
– Integer value of the error.markBtAsError
– Boolean value to qualify the BusinessTransaction as an error. (optional. Default Value: false)
Return Type: void
AddErrorToExitCall
Register an error for the exit call
Format: AgentSDK.AddErrorToExitCall(ExitCall <exitCall>, string <errorName>, string <errorMessage>, bool <markBtAsError>)
Parameters
exitCall
– ExitCall on which the error should be registered.errorName
– Name of ErrorerrorMessage
– Error messagemarkBtAsError
– Boolean value to qualify the ExitCall as an error.
Return Type: void
GetCorrelationHeader
Sets the AppDynamics correlation header at the upstream tier. The downstream tiers read this value to continue correlation. Example available below.
Format: AgentSDK.GetCorrelationHeader(<exitCall
>)
Parameters: exitCall
– Exit Call created for business transaction to downstream tier monitored by AppDynamics.
Return Type: string