You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once you've integrated a Treblle SDK in your codebase, this SDK will send requests and response data to your Treblle Dashboard.
32
-
33
-
In your Treblle Dashboard you get to see real-time requests to your API, auto-generated API docs, API analytics like how fast the response was for an endpoint, the load size of the response, etc.
34
-
35
-
Treblle also uses the requests sent to your Dashboard to calculate your API score which is a quality score that's calculated based on the performance, quality, and security best practices for your API.
36
-
37
-
> Visit [https://docs.treblle.com](http://docs.treblle.com) for the complete documentation.
7
+
Treblle is an API intelligence platfom that helps developers, teams and organizations understand their APIs from a single integration point.
38
8
39
-
## Security
40
-
41
-
### Masking fields
42
-
43
-
Masking fields ensure certain sensitive data are removed before being sent to Treblle.
9
+
---
44
10
45
-
To make sure masking is done before any data leaves your server [we built it into all our SDKs](https://docs.treblle.com/en/security/masked-fields#fields-masked-by-default).
11
+
## Treblle Go Lang SDK
46
12
47
-
This means data masking is super fast and happens on a programming level before the API request is sent to Treblle. You can [customize](https://docs.treblle.com/en/security/masked-fields#custom-masked-fields) exactly which fields are masked when you're integrating the SDK.
13
+
### Requirements
48
14
49
-
> Visit the [Masked fields](https://docs.treblle.com/en/security/masked-fields) section of the [docs](https://docs.sailscasts.com) for the complete documentation.
15
+
| Go Version | Support Status |
16
+
|------------|----------------|
17
+
| 1.23+ | Fully Supported |
18
+
| 1.21 - 1.22 | Should work, not officially tested |
19
+
| < 1.21 | Not Supported |
50
20
51
-
##Get Started
21
+
### Router & Framework Support
52
22
53
-
1. Sign in to [Treblle](https://platform.treblle.com).
54
-
2.[Create a Treblle project](https://docs.treblle.com/en/dashboard/projects#creating-a-project).
55
-
3.[Setup the SDK](#installation) for your platform.
23
+
| Router/Framework | Support Level | Native Integration |
You can also set route paths programmatically in your handlers:
165
+
You can configure Treblle to exclude specific routes from being tracked. This is useful for health checks, metrics endpoints, internal APIs, or any routes you don't want to monitor.
166
+
167
+
### Basic Usage
187
168
188
169
```go
189
-
funcmyHandler(whttp.ResponseWriter, r *http.Request) {
190
-
// Set the route path for this specific request
191
-
r = treblle.SetRoutePath(r, "/api/custom/:param")
192
-
193
-
// Your handler logic
194
-
// ...
195
-
}
170
+
treblle.Configure(treblle.Configuration{
171
+
SDK_TOKEN: "your-treblle-sdk-token",
172
+
API_KEY: "your-treblle-api-key",
173
+
ExcludedRoutes: []string{
174
+
"/health", // Exact match
175
+
"/metrics", // Exact match
176
+
"/admin/*", // Wildcard: matches all admin routes
177
+
"/api/*/internal/*", // Multiple wildcards
178
+
},
179
+
})
196
180
```
197
181
198
-
## Examples
199
-
200
-
Check the `examples` directory for complete example applications:
182
+
### Pattern Types
201
183
202
-
-`gorilla_example`: Shows integration with Gorilla Mux
203
-
-`standard_example`: Shows integration with the standard HTTP package
The environment variable uses comma-separated values and is loaded automatically if `ExcludedRoutes` is not set in the configuration.
227
219
228
-
Besides the SDKs, we also provide helpers and configuration used for SDK
229
-
development. If you're thinking about contributing to or creating a SDK, have a look at the resources
230
-
below:
231
220
232
-
-[`treblle-utils`](https://github.com/Treblle/treblle-utils): A set of helpers and
233
-
utility functions useful for the JavaScript SDKs.
234
-
-[`php-utils`](https://github.com/Treblle/php-utils): A set of helpers and
235
-
utility functions useful for the PHP SDKs.
221
+
## Examples
236
222
237
-
## Community
223
+
Check the `examples` directory for complete example applications:
238
224
239
-
First and foremost: **Star and watch this repository** to stay up-to-date.
225
+
-`gorilla_example`: Shows integration with Gorilla Mux
226
+
-`standard_example`: Shows integration with the standard HTTP package
240
227
241
-
Also, follow our [Blog](https://blog.treblle.com), and on [Twitter](https://twitter.com/treblleapi).
242
228
243
-
You can chat with the team and other members on [Discord](https://treblle.com/chat) and follow our tutorials and other video material at [YouTube](https://youtube.com/@treblle).
2. Verify your SDK token and API key are correct in Treblle dashboard
235
+
3. Test with a simple endpoint first
236
+
4. Check [Treblle documentation](https://docs.treblle.com) for the latest updates
237
+
5. Contact support at <https://treblle.com> or email support@treblle.com
248
238
249
-
[](https://twitter.com/treblleapi)
239
+
## Support
250
240
251
-
### How to contribute
241
+
If you have problems of any kind feel free to reach out via <https://treblle.com> or email support@treblle.com and we'll do our best to help you out.
252
242
253
-
Here are some ways of contributing to making Treblle better:
243
+
## License
254
244
255
-
-**[Try out Treblle](https://docs.treblle.com/en/introduction#getting-started)**, and let us know ways to make Treblle better for you. Let us know here on [Discord](https://treblle.com/chat).
256
-
- Join our [Discord](https://treblle.com/chat) and connect with other members to share and learn from.
257
-
- Send a pull request to any of our [open source repositories](https://github.com/Treblle) on Github. Check the contribution guide on the repo you want to contribute to for more details about how to contribute. We're looking forward to your contribution!
245
+
Copyright 2025, Treblle Inc. Licensed under the MIT license:
0 commit comments