Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lps 197325 glowroot plugin trace level configuration #5681

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
LPS-197325 Rename
  • Loading branch information
brianchandotcom committed Sep 29, 2023
commit e4246d3537c679a237ffed659665dbc428b3728f
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public static TraceEntry onBefore(
sb.append(siteGroupId);
sb.append("]");

if (TemplatesPluginProperties.captureAsOuterTransaction()) {
if (TemplatesPluginProperties.
captureTemplateTransformationsInOuterTransaction()) {

optionalThreadContext.setTransactionOuter();

if (TemplatesPluginProperties.
Expand Down Expand Up @@ -135,7 +137,9 @@ public static TraceEntry onBefore(
sb.append(siteGroupId);
sb.append("]");

if (TemplatesPluginProperties.captureAsOuterTransaction()) {
if (TemplatesPluginProperties.
captureTemplateTransformationsInOuterTransaction()) {

optionalThreadContext.setTransactionOuter();

if (TemplatesPluginProperties.
Expand Down Expand Up @@ -209,7 +213,9 @@ public static TraceEntry onBefore(
sb.append(siteGroupId);
sb.append("]");

if (TemplatesPluginProperties.captureAsOuterTransaction()) {
if (TemplatesPluginProperties.
captureTemplateTransformationsInOuterTransaction()) {

optionalThreadContext.setTransactionOuter();

if (TemplatesPluginProperties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
*/
public class TemplatesPluginProperties {

public static boolean captureAsOuterTransaction() {
return _captureAsOuterTransaction;
}

public static boolean captureTemplateScriptInTransaction() {
return _captureTemplateScriptInTransaction;
}

private static boolean _captureAsOuterTransaction;
public static boolean captureTemplateTransformationsInOuterTransaction() {
return _captureTemplateTransformationsInOuterTransaction;
}

private static boolean _captureTemplateScriptInTransaction;
private static boolean _captureTemplateTransformationsInOuterTransaction;
private static final ConfigService _configService = Agent.getConfigService(
"liferay-templates-plugin");

Expand All @@ -36,10 +36,10 @@ public void onChange() {
}

private void _recalculateProperties() {
_captureAsOuterTransaction = _configService.getBooleanProperty(
"captureAsOuterTransaction"
).value();

_captureTemplateTransformationsInOuterTransaction =
_configService.getBooleanProperty(
"captureTemplateTransformationsInOuterTransaction"
).value();
_captureTemplateScriptInTransaction =
_configService.getBooleanProperty(
"captureTemplateScriptInTransaction"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"name": "Liferay Templates Plugin",
"properties": [
{
"checkboxLabel": "Capture Template transformations as an outer transaction",
"label": "Capture Template transformations as an outer transaction",
"name": "captureAsOuterTransaction",
"checkboxLabel": "Capture template transformations in outer transaction",
"label": "Capture template transformations in outer transaction",
"name": "captureTemplateTransformationsInOuterTransaction",
"type": "boolean"
},
{
"checkboxLabel": "Capture Template script when captured as an outer transaction",
"label": "Capture Template script when captured as an outer transaction",
"checkboxLabel": "Capture template script in transaction",
"label": "Capture template script in transaction",
"name": "captureTemplateScriptInTransaction",
"type": "boolean"
}
Expand Down