Skip to content

Instantly share code, notes, and snippets.

View msavy's full-sized avatar
👋
Apiman Man

Marc Savy msavy

👋
Apiman Man
View GitHub Profile
var APIMAN_CONFIG_DATA = {
"apiman" : {
"version" : "1.5.6-SNAPSHOT",
"builtOn" : "2020-01-22",
"logoutUrl" : "logout"
},
"user" : {
"username" : "admin"
},
"ui" : {
public class Foo {
private String bar = "wow";
}

Apiman metrics can collect arbitrary headers (and query params) as per user configuration (once the relevant PR is merged, anyway!).

There are also a bunch of standard metrics that are always collected, so those are simple (i.e. always non-null columns)

For example, let's imagine the user decides they want to capture the X-Request-Id header in the request and response, and X-Foo in only the request.

In standard InfluxDB/QuestDB you can just dynamically add and remove columns for each one with some reasonable name.

Now they get something like:

#!/bin/bash
for PODNAME in podnam1 podname2 podname3
do
echo mkdir "$PODNAME"
echo oc rsync --include='trace.pacp*' --exclude="*" $PODNAME:/opt/jboss/ "$PODNAME/"
echo oc rsync $PODNAME:/tmp/tcpdump-tls-secrets.log "$PODNAME/"
done
-- *********************************************************************
-- Update Database Script
-- *********************************************************************
-- Change Log: master.xml
-- Ran at: 28/02/2022, 16:16
-- Against: postgres@jdbc:postgresql://localhost:5432/postgres
-- Liquibase version: 4.8.0
-- *********************************************************************
-- Changeset current/20211206-add-locale-to-user-profile.xml::add-locale-to-use-profile::msavy marc@blackparrotlabs.io (manual changeset)
ALTER TABLE public.users ADD locale VARCHAR(255);
#!/usr/bin/env bash
# Remember to install jq (e.g. brew install jq; yum install jq; apt-get install jq)
set -e
RED='\033[0;31m'
NORMAL='\033[0m'
printf "${RED}Getting OAuth2 token from Keycloak (includes access_token, refresh_token, etc):${NORMAL}\n"
KEYCLOAK_RESPONSE=`curl -s -X POST http://127.0.0.1:8080/auth/realms/stottie/protocol/openid-connect/token -H "Content-Type: application/x-www-form-urlencoded" -d 'username=rincewind' -d 'password=apiman' -d 'grant_type=password' -d 'client_id=apiman'`
printf "$KEYCLOAK_RESPONSE \n\n"
diff --git a/manager/api/rest-impl/pom.xml b/manager/api/rest-impl/pom.xml
index f45c365a7..48b23591d 100644
--- a/manager/api/rest-impl/pom.xml
+++ b/manager/api/rest-impl/pom.xml
@@ -93,6 +93,11 @@
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
var APIMAN_CONFIG_DATA = {
"apiman" : {
"version" : "1.2.0-SNAPSHOT",
"builtOn" : "2015-01-01",
"logoutUrl" : "logout"
},
"user" : {
"username" : "admin"
},
"ui" : {
IMAGE CREATED CREATED BY