API Governance | Jan 17, 2025 | 9 min read
Observability is key to optimizing APIs. With Treblle 3.0’s integration with WSO2 API Manager, you gain real-time insights and streamline workflows. This powerful pairing simplifies API tracking, enhances visibility, and helps you spot issues faster—taking your API performance to the next level.
If you've worked with APIs at any level, you know how important it is to understand what's happening under the hood.
Observability is a lifeline for debugging, monitoring, and improving APIs.
With Treblle 3.0, we’ve taken a significant step forward by introducing integration support for WSO2, one of the most popular API gateways.
WSO2 API Manager is an open-source API gateway that’s widely used in enterprises for creating, publishing, and managing APIs. It supports the entire API lifecycle and integrates well with existing enterprise systems.
If your organization uses WSO2, you’re likely already aware of its robust API governance features and capability to scale with your needs. However, while WSO2 excels at API management, it doesn’t natively offer the level of observability that modern developers demand.
What’s especially exciting about this integration is how easy it is to get started. Treblle now supports WSO2 API Manager versions 3.2.0 and 4.3.0, so you can adopt it using an older or latest setup. Within minutes, you can start collecting insights about your APIs, which might take days or weeks to configure manually.
The core value here is simplicity and visibility. With this integration, you can:
This means developers no longer rely solely on WSO2 logs or third-party tools that require complex setups.
Before beginning, make sure you have the following:
java -version
).mvn -version
).WSO2 API Manager homepage
unzip wso2am-4.3.0.zip
cd /path/wso2am-4.3.0/bin/
./api-manager.sh
Login with the default credentials:
https://localhost:9443/carbon
admin
admin
This will log you into the WSO2 Admin Console, where you can manage your APIs.
https://localhost:9443/publisher
admin
admin
Getting started with WSO2 API manager
Fill in the API details, such as:
Fill in the API details inside the WSO2 API manager
Publishing your API in WSO2 API manager
https://localhost:9443/devportal
View of your API published and listed inside WSO2 API manager
Navigate to Subscription section
Use Key Generation Wizard to generate an access token
Provide details and generate the access token
Resource section in the Publisher section
Define endpoints for your API
Testing your API
Selecting the Key type for API testing
Selecting the testing method
Example of working API
Treblle allows you to track and analyze API requests and responses directly. Here's how to integrate Treblle with your WSO2 API Manager:
Visit Treblle's website and sign up for a new account if you haven't already.
After logging in, create a new project. Enter details like:
Adding details for your API in Treblle
Treblle SDK and API ID
To install and configure the Treblle Data Publisher extension, follow these steps:
git clone https://github.com/Treblle/treblle-wso2.git
cd /path/treblle-wso2/wso2am-4.3.0
Build the Source Code:
mvn clean install
.jar
file for the Treblle Data Publisher extension.treblle-wso2/wso2am-4.3.0/target/treblle-data-publisher-*.jar
)..jar
file into the following directory of your WSO2 API Manager:cp treblle-data-publisher-*.jar /path/wso2am-4.3.0/repository/components/lib
/path/wso2am-4.3.0/repository/conf/deployment.toml
[synapse_handlers.treblle_publisher]
enabled=true
class="com.treblle.wso2publisher.handlers.APILogHandler"
/path/wso2am-4.3.0/repository/conf/log4j2.properties
loggers = treblle_publisher, AUDIT_LOG, ...
logger.treblle_publisher.name = com.treblle.wso2publisher
logger.treblle_publisher.level = INFO
logger.treblle_publisher.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE
Before starting the WSO2 server, set the required environment variables on your machine:
export TREBLLE_API_KEY=<your-api-key>
export TREBLLE_PROJECT_ID=<your-project-id>
export TREBLLE_GATEWAY_URL="https://your-wso2-gateway-url"
export TREBLLE_QUEUE_SIZE=20000
export TREBLLE_WORKER_THREADS=1
export ADDITIONAL_MASK_KEYWORDS="testkey,Authorization,token"
export TREBLLE_ENABLED_TENANT_DOMAINS="carbon.super,abc.com"
https://localhost:9443/devportal
Generating OAuth2 token
Copy the generated token
Restart the WSO2 API Manager to ensure all configurations and the Treblle Data Publisher extension are loaded:
cd /path/to/wso2am-4.3.0/bin
./api-manager.sh restart
Using cURL:
curl -k -X GET "https://localhost:8243/<>/version" -H "Authorization: Bearer <access_token>"
Replace <access_token>
with a valid OAuth2 token.
Example of replacing access token with a valid OAuth2 token
The Treblle dashboard provides real-time insights into API requests, compliance checks, and potential issues in your APIs.
Treblle dashboard with real-time insights
Use Treblle's customization features from TOP RIGHT to tailor the displayed information to your needs.
Trebble customization features
This section shows a detailed list of API requests, including key data like request origins, execution time, and status.
Detailed list of API requests
Click on a specific API request to view comprehensive details, such as the request payload, response data, and additional diagnostics.
Click on a specific API request to view details
Integrating Treblle and WSO2 API Manager makes tracking and monitoring your APIs much easier. It lets you see what’s happening with your API requests and responses in real-time.
Treblle helps you spot issues immediately, giving you a clear picture of what’s working and where attention needs to be given.
What stands out the most is how much time it saves. Instead of sifting through data manually, Treblle gives you the key insights you need right on the dashboard.
Stay tuned for more updates as we continue building tools to make your API development journey smoother, faster, and more transparent.
💡
Ready to elevate your API observability with Treblle and WSO2? Get started today and see how easy it is to gain real-time insights and optimize your API performance!
Inconsistent API endpoints slow development, confuse teams, and frustrate users. This guide breaks down the principles and best practices for designing clean, predictable, and scalable API paths that improve developer experience and reduce errors.
We’ve updated the Treblle Go SDK to support Treblle V3, with a full rewrite focused on performance, ease of use, and better integration with Go tools and frameworks. This guide walks you through the changes, setup, and new features.
In this blog, we explore how Go’s concurrency model helps us do more with less. Through a fun kitchen party analogy, you’ll learn about goroutines, channels, waitgroups, semaphores, and how to use them together to build efficient, concurrent programs.