Skip to Content

Treblle Docs

Traefik Plugin

What you get with the plugin

This plugin allows you to integrate your Traefik Proxy  with Treblle  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  Account

Installation

  1. Obtain your API key and SDK Token from Treblle 
  2. Visit the Traefik Plugin Catalog 
  3. Search for Treblle and select Install.
  4. Follow the displayed instructions to configure the plugin in your static and dynamic configurations.
  5. Restart your Traefik instance
  6. Enjoy!

Configuration

Parameter

Type and Description

ApiKey

string - Your API key obtained from Treblle (required)

SDKToken

string - Your SDK Token from Treblle (required)

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

# 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" sdkToken: "your-sdk-token" AdditionalFieldsToMask: - "accessToken" - "refreshToken" RoutesToBlock: - "/api/user/login" - "/ping" RoutesRegex: "^/api/projects"

Note

Make sure to replace your-api-key and your-sdk-token with your actual Treblle credentials.

Tip

Use the AdditionalFieldsToMask parameter to ensure sensitive data like tokens and passwords are properly masked in your API logs.

Last updated on