Question
· Jun 11

Hiding specific strings in the Ensemble Message Viewer

We have an operation that sends a Rest request to an external endpoint. The request includes the secret, which shows up in the Message Viewer. While access to the Production is restricted to only those who need it, we have been asked to remove it from the Message Traces. Is there a way to hide certain information on the Message Viewer ?

Thanks for reading

Product version: IRIS 2021.2
Discussion (2)1
Log in or sign up to continue

Hadn’t used it since Ensemble 2009 ;-), to provide custom html output displayed by the management portal when viewing a message of a class extending Ens.MessageBody, you can override the %GetContentType() and %ShowContents() methods of Ens.Util.MessageBodyMethods in your message class.

Here is a small example :

Class dc.sample.msg.Message Extends Ens.MessageBody
{

Property Name As %String [ InitialExpression = "you" ];

// returns MIME content type
Method %GetContentType() As %String
{
    return "text/html"
}

// output content
Method %ShowContents()
{
    &html<<p>Hello,&nbsp;#(..Name)#</p>>
}


Storage Default
{
<Data name="MessageDefaultData">
<Subscript>"Message"</Subscript>
<Value name="1">
<Value>Name</Value>
</Value>
</Data>
<DefaultData>MessageDefaultData</DefaultData>
<Type>%Storage.Persistent</Type>
}

}

In the management portal message viewer, the message gets displayed as :