SlideShare a Scribd company logo
1 of 18
Download to read offline
[Surat] MuleSoft Meetup Group
JSON Logger and Common Error Handling With MuleSoft
[16th Jan 2021]
2
Organizers
A SHOW OF HANDS:
Who is new to this Meetup?
Jitendra Bafna
Senior Solution Architect
Capgemini
Nitish Jain
Consultant
IBM
3
Speakers
Jitendra Bafna
Senior Solution Architect
Capgemini
4
Agenda
 What is JSON Logger?
 Publishing JSON Logger to Anypoint Exchange
 JSON Logger Attributes
 Common Error Handling.
 Publishing Error Handling Framework to Anypoint Exchange
 Add Error Handling dependencies in MuleSoft application
What is JSON Logger?
● JSON Logger is basically used for logging the message, content in the JSON format. As
logging is very important part of your application but most of the time it is ignored and not
consider as an second citizen and it is taken as an granted.
● Logging is very essential part of your application and it is very important during any
production issue or for troubleshooting.
● MuleSoft provides out-of-box Logger components and it is very easy to use but JSON
logger provides structured way of logging the data.
● JSON Logger can be integrate with third parties tools like Splunk, ELK etc.
Features Of JSON Logger
JSON Logger provides various capabilities
● Logging the message, content.
● Masking the sensitive data in payload before logging.
● DataWeave Functions.
● Sending logs to External Destination like JMS, AMQP etc.
7
Publishing JSON Logger to Anypoint Exchange
Make sure Git is installed on your Desktop.
Step 1: - Clone the Git Repositories JSON Logger to local
git clone https://github.com/mulesoft-consulting/json-logger.git
Step 2: - Add Entry in setting.xml in .m2 repository
Step 3: - Publishing JSON Logger to Anypoint Exchange
./deploy-to-exchange.sh <Anypoint_Org_Id>
8
<servers>
<server>
<id>Exchange2</id>
<username>Anypoint_Username</username>
<password>Anypoint_Password</password>
</server>
</servers>
JSON Logger Configuration
9
• Live Demonstration
- Publishing JSON Logger To Anypoint Exchange
- Implementing JSON Logger in MuleSoft Application
- Masking Data in Payload
- Disabled Fields
- Sending Logs to External Systems (Apache Active MQ)
JSON Logger References
 https://blogs.mulesoft.com/dev-guides/how-to-tutorials/json-logging-mule-4/
 https://blogs.mulesoft.com/dev-guides/json-logging-in-mule-4/
 https://youtu.be/tM4gROClm10
 https://github.com/mulesoft-consulting/json-logger.git
11
Publish Artifacts to Anypoint Exchange
Step 1 – Add MuleRepository credentials in settings.xml located at .m2 folder.
Step 2 – Add Distribution Management in POM.xml
12
<servers>
<server>
<id>MuleRepository</id>
<username>Anypoint_Username</username>
<password>Anypoint_Password</password>
</server>
</servers>
<distributionManagement>
<repository>
<id>MuleRepository</id>
<name>Corporate Repository</name>
<url>https://maven.anypoint.mulesoft.com/api/v1/organizations/<orgId>/maven</url>
<layout>default</layout>
</repository>
</distributionManagement>
Publish Artifacts to Anypoint Exchange
Step 3 – Add classifier as mule-plugin for Mule-Maven-Plugin
Step 4 - Update GroupId as Organization Id in POM.xml
Step 5 – Execute mvn deploy
13
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>${mule.maven.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<classifier>mule-plugin</classifier>
</configuration>
</plugin>
Publish Artifacts to Nexus
Step 1 – Add NexusRepository credentials in settings.xml located at .m2 folder.
Step 2 – Add Distribution Management in POM.xml
14
<servers>
<server>
<id>NexusRepository</id>
<username>Anypoint_Username</username>
<password>Anypoint_Password</password>
</server>
</servers>
<distributionManagement>
<repository>
<id>NexusRepository</id>
<name>Nexus Repository</name>
<url>http://localhost:8081/repository/maven-releases/</url>
</repository></distributionManagement>
Publish Artifacts to Nexus
Step 4 – Add Plugin to POM.xml
15
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<serverId>nexus</serverId>
<nexusUrl>http://localhost:8081/nexus/</nexusUrl>
<skipStaging>true</skipStaging>
</configuration>
</plugin>
Publish Artifacts to Nexus
Step 5 – Execute mvn deploy
mvn deploy
16
Consuming Artifacts from Nexus
Step 1 – Add Artifacts Dependency in Application POM.xml
Step 2 – Add Nexus Repository in POM.xml
17
<dependency>
<groupId>1cb436ed-a889-4fc0-9714-8acdc6a18f22</groupId>
<artifactId>error-handling-common-utility</artifactId>
<version>1.0.0</version>
<classifier>mule-plugin</classifier>
</dependency>
<repository>
<id>Nexus</id>
<name>Mule Nexus Repository</name>
<url>http://localhost:8081/repository/maven-releases/</url>
<layout>default</layout>
</repository>
Live Demonstration
- Creating Common Error Handling Framework
- Publishing Common Error Handling Framework to Anypoint
Exchange
- Import Common Error Handling in MuleSoft Application
- Publishing Common Error Handling Framework to Nexus

More Related Content

What's hot

Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020
D.Rajesh Kumar
 

What's hot (20)

MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLBMuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
 
MuleSoft Kochi Meetup #5– Handling Mule Exceptions
MuleSoft Kochi Meetup #5– Handling Mule ExceptionsMuleSoft Kochi Meetup #5– Handling Mule Exceptions
MuleSoft Kochi Meetup #5– Handling Mule Exceptions
 
Mumbai MuleSoft Meetup #18
Mumbai MuleSoft Meetup #18Mumbai MuleSoft Meetup #18
Mumbai MuleSoft Meetup #18
 
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring BootBuilding APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
 
#3 calicut meetup - understanding slb, dlb and web sockets
#3   calicut meetup - understanding slb, dlb and web sockets#3   calicut meetup - understanding slb, dlb and web sockets
#3 calicut meetup - understanding slb, dlb and web sockets
 
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Mulesoft with ELK (Elastic Search, Log stash, Kibana)Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
 
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...
 
Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020
 
New York City Meetup- 6th March 2021
New York City Meetup- 6th March 2021New York City Meetup- 6th March 2021
New York City Meetup- 6th March 2021
 
MuleSoft_Meetup_#6_Chandigarh_April_2021
MuleSoft_Meetup_#6_Chandigarh_April_2021MuleSoft_Meetup_#6_Chandigarh_April_2021
MuleSoft_Meetup_#6_Chandigarh_April_2021
 
9th Manila MuleSoft Meetup July 2021
9th Manila MuleSoft Meetup July 20219th Manila MuleSoft Meetup July 2021
9th Manila MuleSoft Meetup July 2021
 
Custom MuleSoft connector using Java SDK
Custom MuleSoft connector using Java SDKCustom MuleSoft connector using Java SDK
Custom MuleSoft connector using Java SDK
 
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
 
MuleSoft Surat Live Demonstration Virtual Meetup#5 - Salesforce Composite Con...
MuleSoft Surat Live Demonstration Virtual Meetup#5 - Salesforce Composite Con...MuleSoft Surat Live Demonstration Virtual Meetup#5 - Salesforce Composite Con...
MuleSoft Surat Live Demonstration Virtual Meetup#5 - Salesforce Composite Con...
 
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
 
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
 
MuleSoft meetup__houston #13
MuleSoft meetup__houston #13MuleSoft meetup__houston #13
MuleSoft meetup__houston #13
 
Ahmadabad mule soft_meetup_6march2021_azure_CICD
Ahmadabad mule soft_meetup_6march2021_azure_CICDAhmadabad mule soft_meetup_6march2021_azure_CICD
Ahmadabad mule soft_meetup_6march2021_azure_CICD
 
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and Simplified
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and SimplifiedMuleSoft Surat Virtual Meetup#9 - RAML Reusability and Simplified
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and Simplified
 
MuleSoft Meetup Bangalore - March 6 2021
MuleSoft Meetup Bangalore - March 6 2021MuleSoft Meetup Bangalore - March 6 2021
MuleSoft Meetup Bangalore - March 6 2021
 

Similar to MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With MuleSoft

SFScon22 - Sara Tumiati - Goffice 2.0 - Open-Source Microservices for the Sou...
SFScon22 - Sara Tumiati - Goffice 2.0 - Open-Source Microservices for the Sou...SFScon22 - Sara Tumiati - Goffice 2.0 - Open-Source Microservices for the Sou...
SFScon22 - Sara Tumiati - Goffice 2.0 - Open-Source Microservices for the Sou...
South Tyrol Free Software Conference
 

Similar to MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With MuleSoft (20)

MuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize LogsMuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
 
FluentD vs. Logstash
FluentD vs. LogstashFluentD vs. Logstash
FluentD vs. Logstash
 
Mdb dn 2016_09_34_features
Mdb dn 2016_09_34_featuresMdb dn 2016_09_34_features
Mdb dn 2016_09_34_features
 
Wso2 esb-maintenance-guide
Wso2 esb-maintenance-guideWso2 esb-maintenance-guide
Wso2 esb-maintenance-guide
 
Loggly - Tools and Techniques For Logging Microservices
Loggly - Tools and Techniques For Logging MicroservicesLoggly - Tools and Techniques For Logging Microservices
Loggly - Tools and Techniques For Logging Microservices
 
ONLINE FOOD ORDERS THROUGH WHATSAPP AUTOMATION BOT
ONLINE FOOD ORDERS THROUGH WHATSAPP AUTOMATION BOTONLINE FOOD ORDERS THROUGH WHATSAPP AUTOMATION BOT
ONLINE FOOD ORDERS THROUGH WHATSAPP AUTOMATION BOT
 
ELK - Optimizations & Updates
ELK - Optimizations & UpdatesELK - Optimizations & Updates
ELK - Optimizations & Updates
 
Essential Tools for Modern PHP
Essential Tools for Modern PHPEssential Tools for Modern PHP
Essential Tools for Modern PHP
 
Observability for Integration Using WSO2 Enterprise Integrator
Observability for Integration Using WSO2 Enterprise IntegratorObservability for Integration Using WSO2 Enterprise Integrator
Observability for Integration Using WSO2 Enterprise Integrator
 
Unify logz with fluentd
Unify logz with fluentdUnify logz with fluentd
Unify logz with fluentd
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
 
monitoring linux system
monitoring linux system monitoring linux system
monitoring linux system
 
Refresh your project vision with Report Portal
Refresh your project vision with Report PortalRefresh your project vision with Report Portal
Refresh your project vision with Report Portal
 
West Yorkshire Meetup #4
West Yorkshire Meetup #4West Yorkshire Meetup #4
West Yorkshire Meetup #4
 
SFScon22 - Sara Tumiati - Goffice 2.0 - Open-Source Microservices for the Sou...
SFScon22 - Sara Tumiati - Goffice 2.0 - Open-Source Microservices for the Sou...SFScon22 - Sara Tumiati - Goffice 2.0 - Open-Source Microservices for the Sou...
SFScon22 - Sara Tumiati - Goffice 2.0 - Open-Source Microservices for the Sou...
 
Logs/Metrics Gathering With OpenShift EFK Stack
Logs/Metrics Gathering With OpenShift EFK StackLogs/Metrics Gathering With OpenShift EFK Stack
Logs/Metrics Gathering With OpenShift EFK Stack
 
Log aggregation and analysis
Log aggregation and analysisLog aggregation and analysis
Log aggregation and analysis
 
JSON Logger Baltimore Meetup
JSON Logger Baltimore MeetupJSON Logger Baltimore Meetup
JSON Logger Baltimore Meetup
 
Fluentd - RubyKansai 65
Fluentd - RubyKansai 65Fluentd - RubyKansai 65
Fluentd - RubyKansai 65
 
Princeton-NJ-Meetup-MuleSoft SumoLogic Integration.pptx
Princeton-NJ-Meetup-MuleSoft SumoLogic Integration.pptxPrinceton-NJ-Meetup-MuleSoft SumoLogic Integration.pptx
Princeton-NJ-Meetup-MuleSoft SumoLogic Integration.pptx
 

More from Jitendra Bafna

More from Jitendra Bafna (20)

MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQMuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
 
MuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationMuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft Automation
 
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial ModernizationMuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
 
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
 
MuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
MuleSoft Surat Meetup#51 - API Monitoring - Through a New LensMuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
MuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
 
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
 
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoftMuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
 
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
 
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
 
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
 
MuleSoft Surat Meetup#47 - Error Handling With MuleSoft
MuleSoft Surat Meetup#47 - Error Handling With MuleSoftMuleSoft Surat Meetup#47 - Error Handling With MuleSoft
MuleSoft Surat Meetup#47 - Error Handling With MuleSoft
 
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoftMuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
 
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
 
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With RustMuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
 
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
 
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
 
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoftEngineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
 
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
 
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
 
MuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoft
MuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoftMuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoft
MuleSoft Surat Meetup#40 - Watermarking Concept and Fragments in MuleSoft
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With MuleSoft

  • 1. [Surat] MuleSoft Meetup Group JSON Logger and Common Error Handling With MuleSoft [16th Jan 2021]
  • 2. 2 Organizers A SHOW OF HANDS: Who is new to this Meetup? Jitendra Bafna Senior Solution Architect Capgemini Nitish Jain Consultant IBM
  • 4. 4
  • 5. Agenda  What is JSON Logger?  Publishing JSON Logger to Anypoint Exchange  JSON Logger Attributes  Common Error Handling.  Publishing Error Handling Framework to Anypoint Exchange  Add Error Handling dependencies in MuleSoft application
  • 6. What is JSON Logger? ● JSON Logger is basically used for logging the message, content in the JSON format. As logging is very important part of your application but most of the time it is ignored and not consider as an second citizen and it is taken as an granted. ● Logging is very essential part of your application and it is very important during any production issue or for troubleshooting. ● MuleSoft provides out-of-box Logger components and it is very easy to use but JSON logger provides structured way of logging the data. ● JSON Logger can be integrate with third parties tools like Splunk, ELK etc.
  • 7. Features Of JSON Logger JSON Logger provides various capabilities ● Logging the message, content. ● Masking the sensitive data in payload before logging. ● DataWeave Functions. ● Sending logs to External Destination like JMS, AMQP etc. 7
  • 8. Publishing JSON Logger to Anypoint Exchange Make sure Git is installed on your Desktop. Step 1: - Clone the Git Repositories JSON Logger to local git clone https://github.com/mulesoft-consulting/json-logger.git Step 2: - Add Entry in setting.xml in .m2 repository Step 3: - Publishing JSON Logger to Anypoint Exchange ./deploy-to-exchange.sh <Anypoint_Org_Id> 8 <servers> <server> <id>Exchange2</id> <username>Anypoint_Username</username> <password>Anypoint_Password</password> </server> </servers>
  • 10. • Live Demonstration - Publishing JSON Logger To Anypoint Exchange - Implementing JSON Logger in MuleSoft Application - Masking Data in Payload - Disabled Fields - Sending Logs to External Systems (Apache Active MQ)
  • 11. JSON Logger References  https://blogs.mulesoft.com/dev-guides/how-to-tutorials/json-logging-mule-4/  https://blogs.mulesoft.com/dev-guides/json-logging-in-mule-4/  https://youtu.be/tM4gROClm10  https://github.com/mulesoft-consulting/json-logger.git 11
  • 12. Publish Artifacts to Anypoint Exchange Step 1 – Add MuleRepository credentials in settings.xml located at .m2 folder. Step 2 – Add Distribution Management in POM.xml 12 <servers> <server> <id>MuleRepository</id> <username>Anypoint_Username</username> <password>Anypoint_Password</password> </server> </servers> <distributionManagement> <repository> <id>MuleRepository</id> <name>Corporate Repository</name> <url>https://maven.anypoint.mulesoft.com/api/v1/organizations/<orgId>/maven</url> <layout>default</layout> </repository> </distributionManagement>
  • 13. Publish Artifacts to Anypoint Exchange Step 3 – Add classifier as mule-plugin for Mule-Maven-Plugin Step 4 - Update GroupId as Organization Id in POM.xml Step 5 – Execute mvn deploy 13 <plugin> <groupId>org.mule.tools.maven</groupId> <artifactId>mule-maven-plugin</artifactId> <version>${mule.maven.plugin.version}</version> <extensions>true</extensions> <configuration> <classifier>mule-plugin</classifier> </configuration> </plugin>
  • 14. Publish Artifacts to Nexus Step 1 – Add NexusRepository credentials in settings.xml located at .m2 folder. Step 2 – Add Distribution Management in POM.xml 14 <servers> <server> <id>NexusRepository</id> <username>Anypoint_Username</username> <password>Anypoint_Password</password> </server> </servers> <distributionManagement> <repository> <id>NexusRepository</id> <name>Nexus Repository</name> <url>http://localhost:8081/repository/maven-releases/</url> </repository></distributionManagement>
  • 15. Publish Artifacts to Nexus Step 4 – Add Plugin to POM.xml 15 <plugin> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.1</version> <executions> <execution> <id>default-deploy</id> <phase>deploy</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.1</version> <configuration> <skip>true</skip> </configuration> </plugin> <plugin> <groupId>org.sonatype.plugins</groupId> <artifactId>nexus-staging-maven-plugin</artifactId> <version>1.5.1</version> <executions> <execution> <id>default-deploy</id> <phase>deploy</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> <configuration> <serverId>nexus</serverId> <nexusUrl>http://localhost:8081/nexus/</nexusUrl> <skipStaging>true</skipStaging> </configuration> </plugin>
  • 16. Publish Artifacts to Nexus Step 5 – Execute mvn deploy mvn deploy 16
  • 17. Consuming Artifacts from Nexus Step 1 – Add Artifacts Dependency in Application POM.xml Step 2 – Add Nexus Repository in POM.xml 17 <dependency> <groupId>1cb436ed-a889-4fc0-9714-8acdc6a18f22</groupId> <artifactId>error-handling-common-utility</artifactId> <version>1.0.0</version> <classifier>mule-plugin</classifier> </dependency> <repository> <id>Nexus</id> <name>Mule Nexus Repository</name> <url>http://localhost:8081/repository/maven-releases/</url> <layout>default</layout> </repository>
  • 18. Live Demonstration - Creating Common Error Handling Framework - Publishing Common Error Handling Framework to Anypoint Exchange - Import Common Error Handling in MuleSoft Application - Publishing Common Error Handling Framework to Nexus