4 - Analyze the Source Data
If you run into any issues or have feedback on either the workshop or Pipeline, please reach out to us at support@mezmo.com.
Mezmo's Data Profiler analyzes your source data and provides a a data profile that helps you understand your source data, and configure the Pipeline Processors to optimize it for your purposes. In this step, you'll set up a pipeline with the shared OTel sources that will include a Script Execution Processor to format the data for analysis, and a Data Profiler Processor to analyze it.
Create a Log Explorer Pipeline
- In the Mezmo Web App, go to Pipelines and click New Pipeline.
- Select Create a blank pipeline.
- For Pipeline Name, enter
Log Explorer
. - Under Deployment Options, select SaaS.
- Under Select a path, select Create a blank pipeline.
- Click Continue.
Add the OpenTelemtry Log Source
- In the Pipeline Map, click Add Source.
- Under Shared Sources, select the OTel Log Source.
- Click Save. The Source will be added to the Pipeline Map.
Add the OTel Mapping Script
This script will map OTel fields to a format for the Data Profiler to analyze.
- In the Profile Map, click Add Processor.
- Select Script Execution.
- Copy and paste this script into the Script field.
- Click Save.
- Connect the Source to the Script Execution Processor.
function processEvent(message, metadata, timestamp, annotations) {
let line = message
let app = metadata.resource.attributes["container.name"]
let host = metadata.resource.attributes["container.hostname"]
let level = metadata.level
if( app == null || app == '' ){
app = metadata.resource["service.name"]
}
if( app == null || app == '' ){
app = metadata.resource["service_name"]
}
if( app == null || app == '' ){
app = metadata.scope.name
}
if( app == null || app == '' ){
app = 'na'
}
if( host == null || host == '' ){
host = metadata.headers["x-kafka-partition-key"]
}
if( host == null || host == '' ){
host = metadata.attributes["log.file.path"]
}
if( host == null || host == '' ){
host = 'na'
}
if( level == null || level == '' ){
level = annotations.level
}
let new_msg = {
"line":line,
"app":app,
"host":host,
"level":level
}
// Extract metadata to top level fields
for( const meta of Object.entries(metadata) ){
let meta_name = 'metadataotel_' + meta[0].toString()
let meta_val = meta[1]
new_msg[meta_name] = meta_val
}
return new_msg
}
Add a Data Profiler Processor
- In the Pipeline Map, click Add Processor.
- Select Data Profiler, and give it the name
OTel Demo Log Exploration
. - Click Save.
- Connect the Script Execution Processor to the Data Profiler Processor.
Deploy the Pipeline and View the Data Profile
In the Pipeline Map, click Deploy Pipeline to activate the Pipeline. The Data Profiler will begin to run, and after a few minutes you will see a Data Profile similar to this:

Two things you will immediately notice:
- The
load-generator
service is sending a huge volume of logs simply stating a homepage is being flooded. This is standard behavior of the OpenTelemetry Demo using the Feature Flag: loadgeneratorFloodHomepage , but this data is noisy and costly to retain.

Homepage Flood Log Profile
- There are unnparsed events that appear to be custom Apache logs being sent from the
frontend-proxy
service. While these are defined in the demo code here, we can take steps to make sure this data is structred and parsed properly to be searchable in any downstream Observability system.

Custom Apache Profile
In the next step, you will build out a log telemetry pipeline to address both of these potential issues.