Treblle for .Net

Requirements

  • .NET Framework 4.6.1

Getting started

Create a FREE account on treblle.com to get an API key and Project ID.

You can install Treblle .NET via NuGet Package Manager or by running the following command:


Install-Package Treblle.Net

You will be prompted to enter your Treblle API key and Project ID. Your settings will be saved in Web.config and you can always edit them there.

Here is an example:


<configuration>
	<appSettings>
		<add  key="TreblleApiKey"  value="{Your_API_Key}"  />
		<add  key="TreblleProjectId"  value="{Your_Project_Id}"  />
	</appSettings>
</configuration>

Now you can specify which endpoints you want Treblle to track by adding this simple attribute to any API controller or method:


[Treblle]

That’s it. Your API requests and responses are now being sent to your Treblle project. Just by adding a few lines of code you get features like: auto-documentation, real-time request/response monitoring, error tracking and so much more.

Need to hide additional fields?

If you want to expand the list of fields you want to hide, you can pass property names you want to hide by adding the AdditionalFieldsToMask property to your Web.config file like in the example below.

<configuration>
	<appSettings>
		<add  key="TreblleApiKey"  value="{Your_API_Key}"  />
		<add  key="TreblleProjectId"  value="{Your_Project_Id}"  />
		<add  key="AdditionalFieldsToMask"  value="secretField,highlySensitiveField"  />
	</appSettings>
</configuration>

Support

If you have problems of any kind feel free to reach out via treblle.com or email hello@treblle.com and we’ll do our best to help you out.

More Integrations

PHP

JavaScript

Others