Build 203 – Instana Documentation

2021-06-15

Features

Add support for AWS SDK Lambda Invoke call
IBM Cloud Platform sensor added support for IBM Cloud Container Registry, IBM Cloud Schematics and IBM VPN for VPC
Invoking AWS Lambda functions via the AWS SDK (Lambda#invoke, Lambda#invokeAsync) is now captured and also correlated into the trace for Go and Node.js
AWS Lambda executions that are cold starts are now marked as such in unbounded analytics (for Node.js based Lambdas, other runtimes will follow).
Imminent timeouts of AWS Lambda functions are detected and shown as such in unbounded analytics (for Node.js based Lambdas, other runtimes will follow).

IBM i and Db2 on i monitoring

Instana now supports remote monitoring of multiple IBM i instances.
The monitored IBM i instance will be displayed as a tower on your Infrastructure Map as well as the Db2 on i will be presented as a running process within the tower.
OS related metrics are collected from various system tables, as well as the database related metrics are collected using the built-in IBM i Collection Services.
The supported versions are: 7.2, 7.3 and 7.4.

This includes:

IBM i OS level metrics – a built-in dashboard that displays system and memory pool metrics. For more information, refer to the IBM i docs.
Db2 on i – a built-in dashboard that displays Active Queries, various Operations, Plan Cache and SQL Cursor metrics. For more information, refer to the Db2 on i docs.

IBM APM V8 integration support

Instana now supports integration with IBM Application Performance Monitoring V8. Supported V8 agents attached to an APM V8 server can be integrated with
the Instana server. Metrics and identity information from the APM V8 agents is forwarded to the Instana server. Host, process and IBM Datapower entities and metrics will
appear on the Infrastructure map. Supported V8 agents are:

Linux OS
Window OS
Unix OS on AIX
IBM Datapower

IBM MQ tracing support (Technology Preview)

Instana now supports tracing IBM MQ messages on xLinux 64. For more information, refer to the IBM MQ docs.

IBM Z HMC monitoring (Technology Preview)

Instana now supports remote monitoring of zHMC. This includes a built-in dashboard that displays key metrics. For more information, refer to the IBM Z HMC docs

Instana Agent on OpenShift

The Instana Agent can now be deployed on OpenShift 4.7 and above on IBM Z and LinuxONE.
We made sure to cover all 3 modes of installation – Helm, YAML and Operator.

Find our more on in our OpenShift documentation.

Sensor and Agent enhancements

WebSphere Application

Added EJB metrics ResponseTime and ResponseCount
Added session manager metrics CreateCount and InvalidateCount
Added thread pool metrics ConcurrentHungThreadCount and DeclaredThreadHungCount

IBM Db2 v 11.5 LUW Containerised version with agents running on Linux VMs – Supported on Linux on x86_64, Linux on Power, IBM Z and LinuxONE

Added various metrics related to Top queries, Lock wait, Agent status, DBM Config usage, workload and UOW as metrics collections.
Added detailed table views for DB & DBM configurations, Top Queries, Lock wait, Top Total CPU, Log Disk Wait, Runstats and Diag Log entries.

With Agent 1.1.602 its possible to set mode.web-override.allowed = false in the file <agent-installation>/etc/instana/com.instana.agent.main.config.Agent.cfg to disable the possibility of overriding the Agent Mode directly from the Instana UI.

Localization

You can now inspect the Instana product in nine additional languages. While we aren’t finished yet with the product’s localization (see known issues), we hope you can already benefit from this. The language can be configured within the product’s general user settings (Settings ➡ User Settings ➡ General). With this release, we are supporting the following languages:

Chinese (China),
Chinese (Taiwan),
English,
French,
German,
Italian,
Japanese,
Korean,
Portuguese (Brazil) and
Spanish.

Trace logs for Unbounded Analytics (beta)

We are excited to announce that Logs has joined the Unbounded Analytics family! You can now explore WARN and ERROR Trace Logs outside the context of a Call or Trace. While the feature is in beta, please provide us feedback using the link on top of the page.





Improvements

.Net Core Tracer: Added support for AWS SDK S3 version 3.7.
OpenTelemetry: Improved discoverability of tags in Unbounded Analytics
Java Trace Sensor: Added support for WebSphere EJB tracing
Go Sensor: versions v1.30.0 and instrumentation/instagin/v1.0.0 were released. Support for Gin framework was added.
Instana Trace SDK: The span duration can now be overwritten using the duration tag (in milliseconds)

Fixes

IBM MQ:

Event enhancement.
Add poll rate for each queue manager.
DFQ enhancements – Now you can search by Channel, Cluster, Queue or Queue Manager.

IBM DataPower:

Support appliance down status.

Java Trace Sensor: Correctly trace asynchronous GraphQL calls

PHP

Fixed critical regression issue caused extension to crash
Fixed firing an exception on Yii framework
Limited profilier stack depth to prevent memory overflow in the agent
A number of code improvements and fixes

Known Issues

Some parts of the Instana product are not yet localized or encounter layout issues through localization.

Join #IBMChampion Stephanie Rabbani Live & In-Person on October 25th and learn how to use #Python’s Flask to create APIs in under an hour! Then after dinner, use the #API data & #Bootstrap to create a Dashboard! #IBMi #IBMiOSS @jordiwes @SeidenGroup @IBMChampions

Join #IBMChampion Stephanie Rabbani Live & In-Person on October 25th and learn how to use #Python‘s Flask to create APIs in under an hour! Then after dinner, use the #API data & #Bootstrap to create a Dashboard! #IBMi #IBMiOSS @jordiwes @SeidenGroup @IBMChampions pic.twitter.com/5UKfsOf8jH

– OCEAN User Group (@OCEANUserGroup)08:15 – Oct 08, 2021

Looking forward to it! #IBMChampion #IBMi #IBMiOSS

Looking forward to it! #IBMChampion #IBMi #IBMiOSS twitter.com/CTXiUG/status/…

– Andy Youens ⚓ (@AndyYouens)07:28 – Oct 08, 2021Quoted Tweet:

Next meeting of the @CTXiUG is on Tuesday. The presentation is something I looking forward to from @AndyYouens.
Starts at 6:30 PM CT sharp. More details & registration at ctxiug.blogspot.com
#IBMi #AS400 #CTXiUG #Texas #CentralTexas #ATX #SanAntonio #IBMiLUG pic.twitter.com/Imu7VBqPM0

– Central Texas IBM i User Group (@CTXiUG)05:24 – Oct 08, 2021

Original Software and Midrange Dynamics

BASINGSTOKE, UK and Zug, Switzerland – Sept 30th, 2021

Original Software, a leading provider of testing and test management software, announced today that it has partnered with Midrange Dynamics to deliver world class, reliable change management and testing software for IBM i businesses worldwide.

Through this partnership, Original Software and Midrange Dynamics can now provide a full suite of change management and testing solutions to IBM i businesses. Testing solutions include Test Data Management, Batch Program Testing, Test Automation and Regression Testing.

“We are pleased to partner with Midrange Dynamics to provide our testing solutions for businesses with IBM i,’ said Colin Armitage, CEO of Original Software. “There are thousands of businesses that depend and rely on IBM i technology every day and finding the right tools to support this is important. Original Software is the only company that can provide a comprehensive set of testing tools for IBM i platforms. Midrange Dynamics has proven expertise delivering Change Management Solutions, consultancy and technical support for IBM i businesses worldwide.”

“The collaboration with Original Software, and seamless integration of their industry-leading testing tools with the Midrange Dynamics solutions, makes it easy for organizations to include automated testing in their CI/CD process,” said Michael Morgan, Midrange Dynamics Managing Director.  “As a trusted consultant, our goal is to recommend the best possible solutions to our clients. We are excited about the value our partnership with Original Software will deliver to our shared customer base,” said Mr. Morgan.

About Original Software

Original Software enables organizations to meet their testing objectives rapidly, by delivering innovative solutions to support application quality. For over 25 years, their mission has been to deliver quality software, that is easy to buy, has an intuitive UI and is loved by their clients. Original Software has always offered capabilities for the IBM i that went deeper than any other platform and addressed the particular demands of this server and its operating system. Visit https://origsoft.com/ to find out more or to https://i400quality.com/ for our IBM i testing solutions.

About Midrange Dynamics

Midrange Dynamics provides application lifecycle and API management for hundreds of enterprises and small IT teams worldwide. An IBM Business Partner and IBM ISV council member, the company has been advancing MDCMS for 23 years from its headquarters in Switzerland to meet change management requirements with intuitive, simple-to-use solutions for IBM i and multiplatform development. Whether an organization is on the forefront of DevOps practices, heavy into SQL, or mixing old and new methodologies, Midrange Dynamics can help.

Midrange Dynamics partners with companies around the globe to sell and support the MDCMS product suite. Visit https://www.midrangedynamics.com/where-to-buy to find a representative in your region.

DB2 for i SQL JSON Essential Cheat Sheet

Last Updated on 9 October 2021 by Roberto De Pedrini

Whenever I have to create a JSON to call a Web Service or exchange data with other applications, I have to open previous programs and do a great job of copying and pasting … I thought that creating a small source with the main things could help me … and why not create a Cheat-Sheet to share the IBM i Community?

So here’s a post and a Cheat-Sheet “DB2 for i SQL JSON_OBJECT essential cheat sheet” dedicated to JSON_OBJECT: you can download it, print it, and hang it on the wall behind your PC or at the coffee dispenser.

The official IBM documentation about JSON generation with SQL is available at the following link “ Generating JSON Data

Contributions from readers are welcome so as to enrich the collection with your examples … use the comments to add your contributions, I will edit the post to add examples, tricks, etc.

JSON_OBJECT – Creating a JSON from the DB or from variables and strings

The JSON_OBJECT scalar function allows the creation of JSON starting from the data of a table or view, from variables, or from strings and numbers.

Example 1 – Simple JSON from strings

— Simple JSON

select json_object(‘id’ value 1,
‘Brand’ value ‘Apple’,
‘Model’ value ‘Iphone 12 Pro’,
‘Price’ value 1069.00)
from sysibm.sysdummy1
;

–> Result
{
“id”: 1,
“Brand”: “Apple”,
“Model”: “Iphone 12 Pro”,
“Price”: 1069.0
}

— Or, in a tableless way, for the same result

values(json_object(‘id’ value 1,
‘Brand’ value ‘Apple’,
‘Model’ value ‘Iphone 12 Pro’,
‘Price’ value 1069.00));

Example 2 – Simple JSON from a table (QIWS / QCUSTCDT is an example table we all have on IBM i)

— Simple JSON from a Table
select json_object(‘CustomerId’ value cusnum,
‘LastName’ value lstnam,
‘Credit Limit’ value CDTLMT)
from qiws.qcustcdt
where state=’NY’;

–> Result … 3 json objects
{“CustomerId”:839283,”LastName”:”Jones “,”Credit Limit”:400}
{“CustomerId”:397267,”LastName”:”Tyron “,”Credit Limit”:1000}
{“CustomerId”:192837,”LastName”:”Lee “,”Credit Limit”:700}

Example 3 – Get a single JSON with multiple objects “inside”

select json_object(‘Credits’ value json_arrayagg(json_object(‘CustomerId’ value cusnum,
‘LastName’ value lstnam,
‘Credit Limit’ value CDTLMT) ))
from qiws.qcustcdt
where state=’NY’;

–> Result
{
“Credits”: [
{
“CustomerId”: 839283,
“LastName”: “Jones “,
“Credit Limit”: 400
},
{
“CustomerId”: 397267,
“LastName”: “Tyron “,
“Credit Limit”: 1000
},
{
“CustomerId”: 192837,
“LastName”: “Lee “,
“Credit Limit”: 700
}
]
}

Example 4 – JSON inside a JSON

select json_object(‘Credits’ value json_arrayagg(json_object(‘CustomerId’ value cusnum,
‘Details’ value json_object(
‘LastName’ value lstnam,
‘Initials’ value INIT,
‘Street’ value street,
‘City’ value city),
‘Credit Limit’ value CDTLMT)))
from qiws.qcustcdt
where state=’NY’;

–> Result
{
“Credits”: [
{
“CustomerId”: 839283,
“Details”: {
“LastName”: “Jones “,
“Initials”: “B D”,
“Street”: “21B NW 135 St”,
“City”: “Clay “
},
“Credit Limit”: 400
},
{
“CustomerId”: 397267,
“Details”: {
“LastName”: “Tyron “,
“Initials”: “W E”,
“Street”: “13 Myrtle Dr “,
“City”: “Hector”
},
“Credit Limit”: 1000
},
{
“CustomerId”: 192837,
“Details”: {
“LastName”: “Lee “,
“Initials”: “F L”,
“Street”: “5963 Oak St “,
“City”: “Hector”
},
“Credit Limit”: 700
}
]
}

Example 5 – Layered JSON using SQL’s Group By and JSON_ARRAYAGG functions

The group by function, together with JSON_ARRAYAGG will allow you to create arrays of JSON objects inside a JSON:

select json_object(‘state’ value state,
‘Count’ value count(*),
‘Details’ value json_arrayagg(json_object(‘CustomerId’ value cusnum,
‘LastName’ value lstnam,
‘Credit Limit’ value CDTLMT)
))
from qiws.qcustcdt
group by state
order by state;

–> Result
{“state”:”CA”,”Count”:1,”Details”:[{“CustomerId”:475938,”LastName”:”Doe “,”Credit Limit”:700}]}
..
{“state”:”NY”,”Count”:3,”Details”:[{“CustomerId”:839283,”LastName”:”Jones “,”Credit Limit”:400},{“CustomerId”:397267,”LastName”:”Tyron “,”Credit Limit”:1000},{“CustomerId”:192837,”LastName”:”Lee “,”Credit Limit”:700}]}
{“state”:”TX”,”Count”:2,”Details”:[{“CustomerId”:938472,”LastName”:”Henning “,”Credit Limit”:5000},{“CustomerId”:593029,”LastName”:”Williams”,”Credit Limit”:200}]}
..

Example 6: NULL management

— For the null value … I will use a Null Global variable

create variable faq400.GV_NULL char(1) default Null;

values(json_object(‘id’ value 1,
‘Brand’ value ‘Apple’,
‘Model’ value ‘Iphone 12 Pro’,
‘Price’ value faq400.gv_Null
));

–> Result (with the key price with a null value
{
“id”: 1,
“Brand”: “Apple”,
“Model”: “Iphone 12 Pro”,
“Price”: null
}

— If we ad the ABSENT on NULL clause
values(json_object(‘id’ value 1,
‘Brand’ value ‘Apple’,
‘Model’ value ‘Iphone 12 Pro’,
‘Price’ value faq400.gv_Null
Absent on null
));

–> Result
{
“id”: 1,
“Brand”: “Apple”,
“Model”: “Iphone 12 Pro”
}

— Another way to insert a null value
values(json_object(‘id’ value 1,
‘Brand’ value ‘Apple’,
‘Model’ value ‘Iphone 12 Pro’,
‘Price’ value cast(NULL as varchar(10))
));

— Another one
values(json_object(‘id’ value 1,
‘Brand’ value ‘Apple’,
‘Model’ value ‘Iphone 12 Pro’,
‘Price’ value ‘null’ format JSON
Null on null
));

Example No. 7 – Create a JSON document in the IFS

I talked about it in another post on this blog: “ DB2 for i & SQL – FAQ & Howto (Part.2) (IT) “, to the Faq” iDB2-FAQ-016 – How to store a CLOB in your IFS “… in this piece of ILE RPG code we see the use of a CLOB_FILE variable to store the result in an IFS file.


DCL-S OutFile SQLType(CLOB_FILE) CCSID(1208);

select json_object(‘Credits’ value json_arrayagg(json_object(
‘CustomerId’ value cusnum,
‘LastName’ value lstnam,
‘Credit Limit’ value CDTLMT) ))
into :OutFile
from qiws.qcustcdt
where state=’NY’;

Outfile_Name = ‘/temp/accounts.json’
Outfile_NL = %len(%trimr(Outfile_Name))
Outfile_FO = SQFCRT;

Example No. 8 – Boolean values TRUE and FALSE in JSON

Boolean values (true) and (false) are written in JSON objects without the quotes (“) and always in lowercase … to distinguish them from alphanumeric values.

To obtain the value true and false we must use the non-specific “format JSON”, to indicate that the value of the last JSON is already a JSON!

— These are Boolean
{“Boolean01”:true}
{“Boolean02”:false}

— This is non a Boolean but a Alpha-Key
{“ThisIsNotABooleanKey”:”true”}
{“ThisIsNotABooleanKey”:TRUE}

— Dealing with boolean in DB2 for i SQL and JSON_OBJECT
select json_object(‘Customers’ value json_arrayagg(json_object(‘CustomerId’ value cusnum,
‘LastName’ value lstnam,
‘Is a creditor’ value case when cdtdue>0 then ‘true’ else ‘false’ end format JSON)))
from qiws.qcustcdt
where state=’NY’;

–> Result
{
“Customers”: [
{
“CustomerId”: 839283,
“LastName”: “Jones “,
“Is a creditor”: false
},
{
“CustomerId”: 397267,
“LastName”: “Tyron “,
“Is a creditor”: false
},
{
“CustomerId”: 192837,
“LastName”: “Lee “,
“Is a creditor”: true
}
]
}

Example No. 9 – Creation of an HTTP Header for the QSYS2.HTTP functions

I talked about the QSYS2.HTTP functions to consume Web Service via SQL in the post “ New QSYS2.HTTP Functions SQL (7.4 TR5 and 7.3 TR11) “, I report below a part of RPG code where I use QSYS2.HTTP_POST to call web services of a payment system. Use of variables for URL, Header, Body, and Response to be able to log the call in a log table

..
dcl-s HttpHeader varchar(1024);
dcl-s Body varchar(10000);
dcl-s Url varchar(256);
dcl-s ResponseHeader varchar(1024);
dcl-s Responsemsg varchar(10000);

url=’xx’;
exec sql
set :body=Json_object(….)

exec sql
set :HTTPheader=
json_object(‘header’ value ‘content-type,application/json’,
‘header’ value ‘content-length,’ concat length(trim(:BODY)),
‘sslTolerate’ value ‘true’);

// HTTP_POST
exec sql
select response_http_header, response_message
into :responseheader :Null_ds,
:responsemsg :Null_ds
from table(QSYS2.HTTP_POST_VERBOSE(:url,
cast (:body as clob(10M)),
cast (:HttpHeader as clob(3k)) ));

Example No. 10 – Json Object, Array and Array-Aggregate

select json_object(‘MyCompany’ value json_arrayagg(json_object(‘id’ value a.empno,
‘Employee’ value json_object(‘First Name’ value a.FirstNme,
‘Last Name’ value a.Lastname,
‘BirthDate’ value a.Birthdate),
‘paycheck’ value json_array(json_object(‘Type’ value ‘Salary’,
‘Amount’ value a.Salary),
json_object(‘Type’ value ‘Bonus’,
‘Amount’ value a.Bonus),
json_object(‘Type’ value ‘Comm’,
‘Amount’ value a.Comm)),
‘workdept’ value workdept,
‘Collegues’ value json_array( select trim(b.lastname) concat ‘ ‘ concat trim(b.FirstNme)
from sampledb.employee b
where b.workdept=a.workdept
and b.empno<>a.empno))))
from sampledb.employee a;

–> Result
{
“MyCompany”: [
{
“id”: “000010”,
“Employee”: {
“First Name”: “CHRISTINE “,
“Last Name”: “HAAS “,
“BirthDate”: “1933-08-24”
},
“paycheck”: [
{
“Type”: “Salary”,
“Amount”: 52750.0
},
{
“Type”: “Bonus”,
“Amount”: 1300.0
},
{
“Type”: “Comm”,
“Amount”: 4220.0
}
],
“workdept”: “A00”,
“Collegues”: [
“HAAS CHRISTINE”,
“LUCCHESSI VINCENZO”,
“O’CONNELL SEAN”,
“HEMMINGER DIAN”,
“ORLANDO GREG”
]
},


Roberto De Pedrini
Faq400.com

Verified by MonsterInsights