https://github.com/treblle/treblletraefikplugingo
https://github.com/treblle/treblletraefikplugingo
traefik-plugin
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/treblle/treblletraefikplugingo
- Owner: Treblle
- Created: 2024-04-29T07:55:10.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T01:28:53.000Z (almost 2 years ago)
- Last Synced: 2025-03-07T23:23:07.000Z (about 1 year ago)
- Topics: traefik-plugin
- Language: Go
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Traefik Plugin for Treblle
## What you get with the plugin
This plugin allows you to integrate your [Traefik Proxy](https://traefik.io/traefik/) with [Treblle](https://treblle.com/) seamlessly so you can enjoy:
- Top-Notch Observability: Gain comprehensive insights into your API's operations.
- Auto-Generated API Documentation: Automatically keep your documentation up-to-date with your API changes.
- Alerting and Notifications: Stay informed with alerts on crucial API events and changes.
## Prerequisites
- Traefik: This plugin has been tested on v2 and v3
- [Treblle](https://app.treblle.com/) Account
## Installation
- Obtain your API key and Project ID from [Treblle](https://app.treblle.com/)
- Visit the Traefik [Plugin Catalog](https://plugins.traefik.io/plugins)
- Search for `Treblle` and select Install.
- Follow the displayed instructions to configure the plugin in your static and dynamic configurations.
- Restart your Traefik instance
- Enjoy!
## Configuration
| Parameter | Type | Description |
|----------------------------|--------|-----------------------------------------|
| `ApiKey` | string | Your API key obtained from Treblle. |
| `ProjectId` | string | Your Project ID from Treblle. |
| `AdditionalFieldsToMask` | array | Additional sensitive fields to mask. |
| `RoutesToBlock` | array | Paths to routes that should be hidden. |
| `RoutesRegex` | string | Regex to match and hide specific routes.|
## Example Usage
```yaml
# Static configuration
experimental:
plugins:
treblle:
moduleName: "github.com/Treblle/TreblleTraefikPluginGo"
version: "{version-from-github-releases}"
# Dynamic configuration
http:
routers:
my-router:
entryPoints:
- http
middlewares:
- my-plugin
service: service-whoami
rule: Host(`localhost`)
services:
service-whoami:
loadBalancer:
servers:
- url: "http://localhost:8081"
passHostHeader: true
middlewares:
my-plugin:
plugin:
treblle:
ApiKey: "your-api-key"
ProjectId: "your-project-id"
AdditionalFieldsToMask:
- "accessToken"
- "refreshToken"
RoutesToBlock:
- "/api/user/login"
- "/ping"
RoutesRegex: "^/api/projects"
```